请问关于Struts的Indexed属性的问题

04-11-26 OldCarField
在 http://www.jdon.com/jive/article.jsp?forum=62&thread=12429 的例子中,在用logic.iterator循环遍历了Bean后,这个Bean是否可以在同一网页中用做提交的FormBean?我试了,但总报错,也就是这个Bean的内容可以在jsp中显示,但是要不能提交,请教高见

OldCarField
2004-11-26 07:27
例子调好了,可是做了另一个从从数据库取数据再显示的例子,却怎么也不成功,不知为何,请高手帮助,报错:

java.lang.reflect.InvocationTargetException

at sun.reflect.GeneratedMethodAccessor582.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.java:493)

at org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.java:428)

at org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java:770)

at org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:801)

at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:881)

at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)

at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1252)

at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)

at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)

at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)

at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)

at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)

at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)

at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)

at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)

at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)

at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)

at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)

at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)

at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)

Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 0

at java.util.ArrayList.RangeCheck(ArrayList.java:508)

at java.util.ArrayList.get(ArrayList.java:320)

at adminsystem.view.forms.DepartmentActionForm.getDepts(DepartmentActionForm.java:32)

... 26 more

猜你喜欢