请教nullpointerexception

06-02-14 flutist-flute
我练习一jsp查询(分页显示),当选择下拉列表查看相应页面信息的时候出现了NullPointerException,特想详细请教有关此异常的信息。谢谢!

D:\Borland\JBuilder2005\jdk1.4\bin\javaw -classpath "D:\Borland\JBuilder2005\thirdparty\jakarta-tomcat-5.0.27\bin\bootstrap.jar;D:\66备份 在 192.168.100.65 上\resin-3.0.8\resin-3.0.8\class12.zip;D:\Borland\JBuilder2005\jdk1.4\lib\tools.jar" "-Dcatalina.home=D:/Borland/JBuilder2005/thirdparty/jakarta-tomcat-5.0.27" org.apache.catalina.startup.Bootstrap -config D:\study\jsp\NewTest42\Tomcat\conf\server8080.xml start

2006-2-13 13:08:57 org.apache.coyote.http11.Http11Protocol init

信息: Initializing Coyote HTTP/1.1 on http-8080

2006-2-13 13:08:57 org.apache.catalina.startup.Catalina load

信息: Initialization processed in 3906 ms

2006-2-13 13:08:57 org.apache.catalina.core.StandardService start

信息: Starting service Catalina

2006-2-13 13:08:57 org.apache.catalina.core.StandardEngine start

信息: Starting Servlet Engine: Apache Tomcat/5.0.27

2006-2-13 13:08:57 org.apache.catalina.core.StandardHost start

信息: XML validation disabled

2006-2-13 13:08:59 org.apache.catalina.core.StandardHost getDeployer

信息: Create Host deployer for direct deployment ( non-jmx )

2006-2-13 13:08:59 org.apache.coyote.http11.Http11Protocol start

信息: Starting Coyote HTTP/1.1 on http-8080

2006-2-13 13:08:59 org.apache.catalina.startup.Catalina start

信息: Server startup in 2484 ms

StandardWrapperValve[debugjsp]: Servlet.service() for servlet debugjsp threw exception

java.lang.NullPointerException

java.lang.NullPointerException

at org.apache.jsp.pagedata_jsp._jspService(pagedata_jsp.java:106)

at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)

at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)

at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)

at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)

at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)

at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)

at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)

at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)

at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)

at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)

at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)

at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)

at java.lang.Thread.run(Thread.java:534)

2006-2-13 13:09:31 org.apache.coyote.http11.Http11Protocol pause

信息: Pausing Coyote HTTP/1.1 on http-8080

2006-2-13 13:09:32 org.apache.catalina.core.StandardService stop

信息: Stopping service Catalina

2006-2-13 13:09:32 org.apache.catalina.core.StandardHostDeployer remove

信息: Removing web application at context path /WebModule1

2006-2-13 13:09:32 org.apache.coyote.http11.Http11Protocol destroy

信息: Stopping Coyote HTTP/1.1 on http-8080

banq
2006-02-22 10:59
不要在Jsp中写Java代码,这是错误的。

因为你在Jsp写了Java代码,出现错误,就无法调试了。

如果将Java代码独立出来,就可以方便调试,从而能迅速找到错误。

猜你喜欢