File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Not able to persist my arrayList in Struts2

 
Shyam Sampath
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Joe Ess
Bartender
Posts: 9214
9
Linux Mac OS X Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll have to look into using indexed properties.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic