今天在启动Tomcat 后发现出现了这个错误
严重: Servlet.service() for servlet jsp threw exception java.lang.NoClassDefFoundError: org/apache/jsp/Index_jsp (wrong name: org/apache/jsp/index_jsp) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) at java.lang.ClassLoader.defineClass(ClassLoader.java:616) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:134) at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:66) at org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:618) at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:144) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) 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.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:662)
先说一下背景,因为之前将index.jsp 写成了Index.jsp, 但是我有做了Server 的clean 操作, 似乎没有用处,仍然还是这样子。
然后还有个办法 就是把tomcat/work中对应的文件删除,重新运行启动服务器就OK了。
不过首先要注意一下,Tomcat 的WorkSpace在哪里,。