标签:stack handle 启动 tomcat-7 tran ebs action http asp
今天我像往常一样,执行脚本,拉代码,推代码,更新到服务器,全程看着日志,没有报错,嘴角疯狂上扬,然而。。。意想不到的事情发生了!!!
登录的时候报错了,前台报错,500 - Unable to compile class for JSP。
如下:
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: [35] in the generated java file: [/opt/TestTomcat/apache-tomcat-7.0.69/work/Catalina/localhost/adassist3/org/apache/jsp/index_jsp.java]
The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:103)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:366)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:490)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:379)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:354)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:341)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:662)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:364)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:209)
com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:244)
org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:105)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
在网上查了很久,原因可能是jar包冲突,于是实际操作了一把:
1)在tomcat/lib路径下找到servlet-api.jar,jsp-api.jar;
2)在项目路径下:项目/WEB-INF/lib 中找到 servlet-api.jar,jsp-api.jar;
3)确认之后,把项目下的这两个jar包删除;
4)重新启动tomcat,顺利登陆,问题搞定。
标签:stack handle 启动 tomcat-7 tran ebs action http asp
原文地址:https://www.cnblogs.com/piaopiao-emmm/p/10272511.html