Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Himai Minh

ActionForm in session scope

Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

The overall mission is to change the world. When you've done that, then you can read this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
    Bookmark Topic Watch Topic
  • New Topic