I'm having trouble (re)populating a Form with nested beans when i submit the values with the scope set to request. If i run the exact same code using a session scope then it works fine. Has anyone run into similar problems ? If so, what possible causes of the problem should i be looking at ?
My actionform contains a list and a string: private String action = ""; private ArrayList problematicOddsList = new ArrayList(); The html code generated html looks like this: <form name="UnknownSportForm" method="post" action="/ManageUnknownSportsAction.do"> <input type="hidden" name="action" value="update"> <input type="hidden" name="problematicOddsList[0].siteId" value="0"> <input type="hidden" name="problematicOddsList[0].sportType" value="blahblah"> <input type="hidden" name="problematicOddsList[1].siteId" value="0"> <input type="hidden" name="problematicOddsList[1].sportType" value="blahblah2"> Since the very same code works when I use a session scope I can't quite figure out what i'm doing wrong. It seems to me that somehow the instance that Struts tries to populate using the request contains a List which is initialized to too small a size to fit the submitted data, I don't understand why though and I'm quite sure I've used similar constructs in the past without problems (albeit on a Weblogic server and not JBoss). Any clues anyone ? ---- Actual errormsg form the log ------- 2004-02-09 16:29:32,218 DEBUG [org.apache.struts.action.RequestProcessor] Populating bean properties from this request 2004-02-09 16:29:32,218 ERROR [org.jboss.web.localhost.Engine] StandardWrapperValve[action]: Servlet.service() for servlet action threw exception javax.servlet.ServletException: BeanUtils.populate ... ... ... 2004-02-09 16:29:32,421 ERROR [org.jboss.web.localhost.Engine] ----- Root Cause ----- java.lang.IndexOutOfBoundsException: Index: 4, Size: 0 ---- Actual errormsg form the log ------- //Linus Nikander - [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]