• 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 ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Not able to persist my arrayList in Struts2

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have recently started using Struts2. I have a jsp which iterates through an ArrayList of JavaBeans. And the jsp has some form fields for user input. The input data is stored in Arraylist as beans. As and when the user inputs data it ll displayed as rows one below the other. The problem I am facing is that I am not able to persist the arraylist, i.e. when the first data is entered it works fine. But when the second data is entered it replaces the first one instead of getting appended with it. I tried making the ArrayList hidden, but no luck. Could any one of you please help me with this issue?

I have attached the code for your reference.


This is my JSP



This is my action class




Thanks
Shyam
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You'll have to look into using indexed properties.
 
What's a year in metric? Do you know this metric stuff tiny ad?
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic