当前位置: 技术问答>java相关
关于部署Javabean的问题
来源: 互联网 发布时间:2017-05-02
本文导语: 我将编译后的Javabean放在默认的“WEB-INF”-“class”目录下,是不是还要在“web.xml”中进行相应的设置呢? 我现在遇到问题就是无法在jsp页面中正常访问编写好的Javabean。 访问时的提示信息如下: --------...
我将编译后的Javabean放在默认的“WEB-INF”-“class”目录下,是不是还要在“web.xml”中进行相应的设置呢?
我现在遇到问题就是无法在jsp页面中正常访问编写好的Javabean。
访问时的提示信息如下:
-----------------
A Servlet Exception Has Occurred
Exception Report:
javax.servlet.ServletException
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:481)
at _0002fHello_0002ejspHello_jsp_1._jspService(_0002fHello_0002ejspHello_jsp_1.java:109)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Compiled Code)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(Compiled Code)
at org.apache.jasper.servlet.JspServlet.service(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Compiled Code)
at org.apache.catalina.core.StandardWrapperValve.invoke(Compiled Code)
at org.apache.catalina.core.ContainerBase.invoke(Compiled Code)
at org.apache.catalina.core.StandardContextValve.invoke(Compiled Code)
at org.apache.catalina.valves.ValveBase.invokeNext(Compiled Code)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Compiled Code)
at org.apache.catalina.core.ContainerBase.invoke(Compiled Code)
at org.apache.catalina.core.StandardContext.invoke(Compiled Code)
at org.apache.catalina.core.StandardHostValve.invoke(Compiled Code)
at org.apache.catalina.valves.ValveBase.invokeNext(Compiled Code)
at org.apache.catalina.valves.AccessLogValve.invoke(Compiled Code)
at org.apache.catalina.core.ContainerBase.invoke(Compiled Code)
at org.apache.catalina.core.StandardEngineValve.invoke(Compiled Code)
at org.apache.catalina.core.ContainerBase.invoke(Compiled Code)
at org.apache.catalina.connector.http.HttpProcessor.process(Compiled Code)
at org.apache.catalina.connector.http.HttpProcessor.run(Compiled Code)
at java.lang.Thread.run(Thread.java:479)
Root Cause:
java.lang.NullPointerException
at _0002fHello_0002ejspHello_jsp_1._jspService(_0002fHello_0002ejspHello_jsp_1.java:83)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Compiled Code)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(Compiled Code)
at org.apache.jasper.servlet.JspServlet.service(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Compiled Code)
at org.apache.catalina.core.StandardWrapperValve.invoke(Compiled Code)
at org.apache.catalina.core.ContainerBase.invoke(Compiled Code)
at org.apache.catalina.core.StandardContextValve.invoke(Compiled Code)
at org.apache.catalina.valves.ValveBase.invokeNext(Compiled Code)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Compiled Code)
at org.apache.catalina.core.ContainerBase.invoke(Compiled Code)
at org.apache.catalina.core.StandardContext.invoke(Compiled Code)
at org.apache.catalina.core.StandardHostValve.invoke(Compiled Code)
at org.apache.catalina.valves.ValveBase.invokeNext(Compiled Code)
at org.apache.catalina.valves.AccessLogValve.invoke(Compiled Code)
at org.apache.catalina.core.ContainerBase.invoke(Compiled Code)
at org.apache.catalina.core.StandardEngineValve.invoke(Compiled Code)
at org.apache.catalina.core.ContainerBase.invoke(Compiled Code)
at org.apache.catalina.connector.http.HttpProcessor.process(Compiled Code)
at org.apache.catalina.connector.http.HttpProcessor.run(Compiled Code)
at java.lang.Thread.run(Thread.java:479)
我现在遇到问题就是无法在jsp页面中正常访问编写好的Javabean。
访问时的提示信息如下:
-----------------
A Servlet Exception Has Occurred
Exception Report:
javax.servlet.ServletException
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:481)
at _0002fHello_0002ejspHello_jsp_1._jspService(_0002fHello_0002ejspHello_jsp_1.java:109)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Compiled Code)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(Compiled Code)
at org.apache.jasper.servlet.JspServlet.service(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Compiled Code)
at org.apache.catalina.core.StandardWrapperValve.invoke(Compiled Code)
at org.apache.catalina.core.ContainerBase.invoke(Compiled Code)
at org.apache.catalina.core.StandardContextValve.invoke(Compiled Code)
at org.apache.catalina.valves.ValveBase.invokeNext(Compiled Code)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Compiled Code)
at org.apache.catalina.core.ContainerBase.invoke(Compiled Code)
at org.apache.catalina.core.StandardContext.invoke(Compiled Code)
at org.apache.catalina.core.StandardHostValve.invoke(Compiled Code)
at org.apache.catalina.valves.ValveBase.invokeNext(Compiled Code)
at org.apache.catalina.valves.AccessLogValve.invoke(Compiled Code)
at org.apache.catalina.core.ContainerBase.invoke(Compiled Code)
at org.apache.catalina.core.StandardEngineValve.invoke(Compiled Code)
at org.apache.catalina.core.ContainerBase.invoke(Compiled Code)
at org.apache.catalina.connector.http.HttpProcessor.process(Compiled Code)
at org.apache.catalina.connector.http.HttpProcessor.run(Compiled Code)
at java.lang.Thread.run(Thread.java:479)
Root Cause:
java.lang.NullPointerException
at _0002fHello_0002ejspHello_jsp_1._jspService(_0002fHello_0002ejspHello_jsp_1.java:83)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Compiled Code)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(Compiled Code)
at org.apache.jasper.servlet.JspServlet.service(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Compiled Code)
at org.apache.catalina.core.StandardWrapperValve.invoke(Compiled Code)
at org.apache.catalina.core.ContainerBase.invoke(Compiled Code)
at org.apache.catalina.core.StandardContextValve.invoke(Compiled Code)
at org.apache.catalina.valves.ValveBase.invokeNext(Compiled Code)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Compiled Code)
at org.apache.catalina.core.ContainerBase.invoke(Compiled Code)
at org.apache.catalina.core.StandardContext.invoke(Compiled Code)
at org.apache.catalina.core.StandardHostValve.invoke(Compiled Code)
at org.apache.catalina.valves.ValveBase.invokeNext(Compiled Code)
at org.apache.catalina.valves.AccessLogValve.invoke(Compiled Code)
at org.apache.catalina.core.ContainerBase.invoke(Compiled Code)
at org.apache.catalina.core.StandardEngineValve.invoke(Compiled Code)
at org.apache.catalina.core.ContainerBase.invoke(Compiled Code)
at org.apache.catalina.connector.http.HttpProcessor.process(Compiled Code)
at org.apache.catalina.connector.http.HttpProcessor.run(Compiled Code)
at java.lang.Thread.run(Thread.java:479)
|
使用beans不用修改web.xml
检查一下哪里有空指针,应该是代码错误
有代码比较容易判断
检查一下哪里有空指针,应该是代码错误
有代码比较容易判断