已解决:An error occurred at line: 1 in the generated java file The type java.io.ObjectInputStream canno

tomcat报错

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
HTTP Status 500 - org.apache.jasper.JasperException: Unable to load class for JSP
type Exception report

message org.apache.jasper.JasperException: Unable to load class for JSP

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

exception

org.apache.jasper.JasperException: org.apache.jasper.JasperException: Unable to load class for JSP
	org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:161)
	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:717)
	org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:164)
	org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:191)
	com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:372)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:276)
	org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)
	org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:575)
	org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:81)
	org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)
	org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
root cause

org.apache.jasper.JasperException: Unable to load class for JSP
	org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:630)
	org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:149)
	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:717)
	org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:164)
	org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:191)
	com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:372)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:276)
	org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)
	org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:575)
	org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:81)
	org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)
	org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
root cause

java.lang.ClassNotFoundException: org.apache.jsp.WEB_002dINF.jsp.frame.error_jsp
	java.net.URLClassLoader.findClass(URLClassLoader.java:382)
	org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:134)
	org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:66)
	org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:628)
	org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:149)
	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:717)
	org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:164)
	org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:191)
	com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:372)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:276)
	org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)
	org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:575)
	org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:81)
	org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)
	org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.36 logs.

原因是tomcat和jdk的版本不兼容 更换jdk或者tomcat即可

你可能感兴趣的:(Java,java,struts2,tomcat,servlet,web.xml)