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

今天在跑老项目的时候出现了一个问题,eclipse报错:

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

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

exception

org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 1 in the generated java file The type java.io.ObjectInputStream cannot be resolved. It is indirectly referenced from required .class files Stacktrace: org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:439) org.apache.jasper.compiler.Compiler.compile(Compiler.java:349) org.apache.jasper.compiler.Compiler.compile(Compiler.java:327) org.apache.jasper.compiler.Compiler.compile(Compiler.java:314) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317) 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:717)

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

 

具体意思就是无法编译jsp,环境使用的是tomcat8,是无法进行编译的,这个问题导致页面访问的时候都是那种500的错误

最终根据猜测应该是环境问题,tomcat问题,

修改eclipse中tomcat的版本,最终修改为tomcat7,所以最终编译成功

posted @ 2019-02-28 12:18  菩提树下的丁春秋  阅读(3069)  评论(0编辑  收藏  举报