Ext.TreePanel org.apache.catalina.core.StandardWrapperValve invoke

在定义一颗树后,运行报下面的错误:
2011-6-13 11:29:04 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet [jsp] in context with path [/DocumentOptimization] threw exception [java.lang.NullPointerException] with root cause
java.lang.NullPointerException
	at org.apache.jsp.cmd_002dcatalog_jsp._jspService(cmd_002dcatalog_jsp.java:81)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:498)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:394)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:166)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
	at java.lang.Thread.run(Thread.java:619)



原因如下:个人比较粗心。忘记把自己创建的测试文档删除,导致jsp文件无法正确读取。
不过在查找错误的过程中学习到一种好的方法

Servlet.service() for servlet [jsp] in context

很有可能由于jsp在前面编译的时候可以通过,但是你自己添加新的文档进去的导致出错。但是无法确定到底是哪个servlet出错了。可以把tomcat下的work下面的目录找到对应的web工程。删除。重新编译jsp文件就可以查找出哪个文件出错了

你可能感兴趣的:(java,apache,jsp,servlet,ext)