网络商店实例调试出现问题!!望各位大虾能指点迷津!
最近学习《精通Eclipse Web开发--Java体系结构、工具、架构及整合应用》书中的实例netshop时遇到调试问题,望各位大虾能指点迷津!
本实例的登陆和注册模块经过测试没有问题,问题出现在点击具体商品以浏览具体信息的时候,出现问题的页面如下:
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException:
javax.servlet.jsp.JspException: An error occurred while evaluating custom action attribute "items " with value "${itemList.pageList} ": An error occurred while getting property "pageList " from an instance of class org.springframework.beans.support.PagedListHolder (
java.lang.NullPointerException)
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:821)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
org.apache.jsp.Jsp.Product_jsp._jspService(Product_jsp.java:262)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063)
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
com.netshop.util.CloseSessionFilter.doFilter(CloseSessionFilter.java:37)
com.netshop.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:91)
root cause
java.lang.
NullPointerException org.springframework.beans.support.PagedListHolder.getNrOfPages(PagedListHolder.java:194)
org.springframework.beans.support.PagedListHolder.getPage(PagedListHolder.java:169)
org.springframework.beans.support.PagedListHolder.getFirstElementOnPage(PagedListHolder.java:244)
org.springframework.beans.support.PagedListHolder.getPageList(PagedListHolder.java:260)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
org.apache.taglibs.standard.lang.jstl.ArraySuffix.evaluate(ArraySuffix.java:278)
org.apache.taglibs.standard.lang.jstl.ComplexValue.evaluate(ComplexValue.java:107)
org.apache.taglibs.stan