aspose file tools*
The moose likes Struts and the fly likes Not able to persist my arrayList in Struts2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Not able to persist my arrayList in Struts2" Watch "Not able to persist my arrayList in Struts2" New topic
Author

Not able to persist my arrayList in Struts2

Shyam Sampath
Greenhorn

Joined: Jun 28, 2011
Posts: 1
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

Joined: Oct 29, 2001
Posts: 8908
    
    8

You'll have to look into using indexed properties.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Not able to persist my arrayList in Struts2