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

来源:互联网 发布:淘宝上如何制作图片 编辑:程序博客网 时间:2024/05/18 16:16
HTTP Status 500 -type Exception reportmessagedescription The server encountered an internal error () that prevented it from fulfilling this request.exceptionjavax.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 causejava.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)

运行的时候突然出现这个项目,看着错误很长,其实是 tomcat下webapps文件夹下你所运行的工程的web-inf的lib多了两个跟tomcat服务器本身冲突的jar包,把 javax.servlet.jsp.jar和javax.servlet.jar包都删除了就可以正确运行了!
查看了一下,web-inf的lib里的确多了这两个包,删除掉后重新编译却又生成了。。之后,直接删除掉项目,再重新导入、编译,就没发现这个问题了。

转载地址

0 0