java.lang.NoSuchMethodError: javax.servlet.jsp.JspFactory.getJspApplicationConte

HTTP Status 500 -


type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: java.lang.NoSuchMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:275)  javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

 

root cause

java.lang.NoSuchMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;  org.apache.jsp.Login_jsp._jspInit(Login_jsp.java:22)  org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52)  org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:159)  org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)  javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

 

note The full stack trace of the root cause is available in the Apache Tomcat/6.0.20 logs.

 

运行的时候突然出现这个项目,看着错误很长,其实是tomcat下webapps文件夹下你所运行的工程的web-inf的lib多了两个跟tomcat服务器本身冲突的jar包,把javax.servlet.jsp.jar和javax.servlet.jar包都删除了就可以正确运行了!

你可能感兴趣的:(java,apache,tomcat,jsp,servlet)