• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

ActionForm in session scope

 
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Grow a forest with seedballs and this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic