首页新闻找找看学习计划

在本地用myeclipse启动项目没问题,打成war包到测试服务器直接用tomcat启动报如下错误

0
悬赏园豆:50 [已解决问题] 解决于 2016-10-24 09:10

系统发生内部错误,具体错误如下:

org.apache.jasper.JasperException: Unable to compile class for JSP: 

An error occurred at line: 143 in the jsp file: /common/page/sessionovertime.jsp
The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files
140:   String CONTEXT_PATH = request.getContextPath();  
141:   
142:   StringBuffer sbf = new StringBuffer("http://");
143:   sbf.append(request.getServerName());
144:   sbf.append(":");
145:   sbf.append(request.getServerPort());
146:   sbf.append("/vaccine/login.jsp"); 


Stacktrace:
	at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
	at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
	at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:439)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:356)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:334)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:321)
	at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
	at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
	at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)
	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
	at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
	at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)
	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.jwx.nipm.vaccine.util.ActionLogFilter.doFilter(ActionLogFilter.java:94)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.jwx.nipm.vaccine.util.PrevilligesFilter.doFilter(PrevilligesFilter.java:45)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.jwx.nipm.vaccine.util.SessionFilter.doFilter(SessionFilter.java:283)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.jwx.nipm.vaccine.web.CoreFilter.doFilter(CoreFilter.java:86)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:615)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
	at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:877)
	at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:594)
	at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1675)
	at java.lang.Thread.run(Thread.java:745)
走走看的主页 走走看 | 初学一级 | 园豆:16
提问于:2016-10-19 14:45
< >
分享
最佳答案
0

JDK版本不一致吧,在myeclipse中运行的JDK和tomcat使用的JDK不是一个

收获园豆:50
2012 | 专家六级 |园豆:18877 | 2016-10-19 17:43

已经解决。谢谢

走走看 | 园豆:16 (初学一级) | 2016-10-24 09:10
其他回答(1)
0

把你tomcat的路径中间的空格去掉 如:C:\Program Files (x86)\Apache Software Foundation\Tomcat 6.0这是默认的。改为:C:\ProgramFiles (x86)\ApacheSoftwareFoundation\Tomcat 6.0 把涉及到的文件的空格去掉看看

小何人家 | 园豆:307 (菜鸟二级) | 2016-10-19 17:05
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册