本文主要是介绍Servlet.service() for servlet jsp threw exception,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
在实现OA的时候,遇到了这样的错误:
java.lang.NullPointerException
atorg.apache.struts2.components.IteratorComponent$CounterIterator.<init>(IteratorComponent.java:367)
atorg.apache.struts2.components.IteratorComponent.start(IteratorComponent.java:279)
atorg.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:53)
atorg.apache.jsp.WEB_002dINF.jsp.forumAction.show_jsp._jspx_meth_s_005fiterator_005f2(show_jsp.java:769)
atorg.apache.jsp.WEB_002dINF.jsp.forumAction.show_jsp._jspService(show_jsp.java:197)
atorg.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
atjavax.servlet.http.HttpServlet.service(HttpServlet.java:803)
atorg.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
atorg.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
atorg.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
atjavax.servlet.http.HttpServlet.service(HttpServlet.java:803)
atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
atorg.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
atorg.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)
atorg.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
atorg.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
atorg.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:154)
atorg.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)
atcom.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:362)
atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:266)
atcom.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165)
atcom.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
atcom.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252)
atorg.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
atcom.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
atcom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
断点调试之后,发现后台有数据,但是前台页面死活报这个错误,前前后后看了很久,才发现原因是我自己给自己挖了个坑,由于参数类型不一致,导致的。留下记录博客一篇,警醒自己。
这篇关于Servlet.service() for servlet jsp threw exception的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!