【已解决】java.lang.NoSuchMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext

今天遇到一个怪异的事情,我本地的项目正常,放在了UAT环境就启动不了, 报错:

message java.lang.NoSuchMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;


原来是因为UAT环境是Tomcat6 而我本地是Tomcat5,5里面是需要servlet-api.jar和jsp-api.jar的,但是6里面是不需要这两个jar的,所以删除就好了。


详细错误:

type Exception report

message java.lang.NoSuchMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;

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:268)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
	filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:35)

root cause

java.lang.NoSuchMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;
	org.apache.jsp.indexlis_jsp._jspInit(indexlis_jsp.java:22)
	org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52)
	org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:164)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:340)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
	filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:35)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值