aspose file tools*
The moose likes Struts and the fly likes ActionForm in session scope Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "ActionForm in session scope" Watch "ActionForm in session scope" New topic
Author

ActionForm in session scope

Shankar Narayana
Ranch Hand

Joined: Jan 08, 2003
Posts: 134
I have ActionForm which has a variable of type ArrayList, and I am using the nested tags to iterate through the arraylist in the jsp. For each row there is a delete button which removes the object from the arraylist when clicked.

Prior to putting the scope="session" in the <action path=...> of the struts config file, i was not able to retrieve the value of the arraylist upon form submission. Now when the scope is session and when I delete/add the rows in some order, during this process sometime it throws the IndexOutOfBoundsException for the arraylist.

Actually when i see the length of the Arraylist in the jsp page before iterating it shows me the correct length, but i dont know why the <nested:iterete> tag is looking beyond the length.

I think it is something to do with the session, anybody has some clue





the jsp code



shankar


"Failure is not when you fall down; its only when you fail to get up again."
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ActionForm in session scope