关于struts2 中 request.setAttribute()的问题
情景如下:
在action中想把一个 List对象(里面封装的是若干个bean) 传到 jsp ,以遍历输出bean中的各属性值,
现在的问题:
我在Action中使用 request.setAttribute("userList",list) 时,会报错,异常信息如下,有没有哪位朋友知道怎么解决,万分感谢
严重:
Servlet.service() for servlet jsp threw exceptionjava.lang.ClassNotFoundException:
org.apache.commons.beanutils.NestedNullException at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at org.displaytag.tags.TemplateTag.evaluateExpression(TemplateTag.java:84)
at org.displaytag.tags.TableTag.initParameters(TableTag.java:847)
at org.displaytag.tags.TableTag.doStartTag(TableTag.java:722)
at org.apache.jsp.pages.admin.userCheck_jsp._jspx_meth_display_005ftable_005f0(userCheck_jsp.java:346)
at org.apache.jsp.pages.admin.userCheck_jsp._jspx_meth_s_005fif_005f0(userCheck_jsp.java:307)
at org.apache.jsp.pages.admin.userCheck_jsp._jspService(userCheck_jsp.java:116)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
at org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:139)
at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:178)
......
------解决方案--------------------应该是你类没有找到,代码贴一下 或者你仔细检查下
------解决方案--------------------java.lang.
ClassNotFoundException: org.apache.commons.beanutils.NestedNullException
类不能发现异常
楼主看看你的项目里有没有commons-beanutils-*.jar 包