当前位置: 技术问答>java相关
JSP中没有任何错误,但出现下面的异常可能是程序哪一块出现了问题?(在线等待)
来源: 互联网 发布时间:2015-05-30
本文导语: A Servlet Exception Has Occurred Exception Report: javax.servlet.ServletException at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:481) at jsp.myjsp._0002fjsp_0002fmyjsp_0002fInputScore_0002ejspInputScore_jsp_2._jspService(_0002fjsp_0002fmyjsp_0002f...
A Servlet Exception Has Occurred
Exception Report:
javax.servlet.ServletException
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:481)
at jsp.myjsp._0002fjsp_0002fmyjsp_0002fInputScore_0002ejspInputScore_jsp_2._jspService(_0002fjsp_0002fmyjsp_0002fInputScore_0002ejspInputScore_jsp_2.java:158)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:184)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:328)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:407)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:251)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:196)
at org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:464)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2041)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:414)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:159)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:818)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:897)
at java.lang.Thread.run(Thread.java:484)
Root Cause:
java.lang.NullPointerException
at jsp.myjsp._0002fjsp_0002fmyjsp_0002fInputScore_0002ejspInputScore_jsp_2._jspService(_0002fjsp_0002fmyjsp_0002fInputScore_0002ejspInputScore_jsp_2.java:57)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:184)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:328)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:407)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:251)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:196)
at org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:464)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2041)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:414)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:159)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:818)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:897)
at java.lang.Thread.run(Thread.java:484)
|
servlet的毛病。大概是你没有把servlet包放到环境变量中去。
|
Root Cause:
java.lang.NullPointerException at ...
数组、字符串、记录集为空,但是你却使用了这个变量;找找吧,一定有
java.lang.NullPointerException at ...
数组、字符串、记录集为空,但是你却使用了这个变量;找找吧,一定有
|
NullPointerException
应该是试图调用值为null的对象方法,
因为一个对象值为null时,
是不允许任何对该对象方法调用的.
最好声明对象时,就初始化该对象!
你出现的问题我想可能是:你从另一个页面接收参数,然后
对参数进行操作,有时候,正确得到参数,所以正常。
但有时间页面得不到参数时,但出现以上至命错误!
好好找找。
应该是试图调用值为null的对象方法,
因为一个对象值为null时,
是不允许任何对该对象方法调用的.
最好声明对象时,就初始化该对象!
你出现的问题我想可能是:你从另一个页面接收参数,然后
对参数进行操作,有时候,正确得到参数,所以正常。
但有时间页面得不到参数时,但出现以上至命错误!
好好找找。