The moose likes Struts and the fly likes struggling with repeated values Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struggling with repeated values" Watch "struggling with repeated values" New topic

struggling with repeated values

Sandeep Jidagi

Joined: Apr 23, 2012
Posts: 9
Hi All,
I've problem with my program which includes Struts framework.
If I run my application it displays the first values. If I insert another values in to the arraylist, current values is overwrtten with previous values and also copied to the next place and son in the 3rd time when inserting..

Here's My Code.


Thanks and Regards,
Joe Ess

Joined: Oct 29, 2001
Posts: 9189

Welcome to the JavaRanch. I added Code Tags to your post to make the code easier to read. Please use them in the future.

Your code is confusing. The StudentBean is both a single student and a collection of students? That's a Bad Idea.

[How To Ask Questions On JavaRanch]
Sandeep Jidagi

Joined: Apr 23, 2012
Posts: 9
HI.. Joe Ess StudentBean is bean class. which gets data from the StudentForm class.
I'm using this StudentBean Class to display data using <logic:iterate> tags.

Even I used static arraylist.

My Output Example:
After submitting the form for Sandeep
Sandeep: Your Request Receieved

After submitting the form for Anand.
Anand: Your Request Receieved

I need to get the output in display.jsp like:[Exapected]


but actual output i'm getting

Please Help Me.

Sandeep Jidagi

Joined: Apr 23, 2012
Posts: 9
Problem Resolved
updated code

I agree. Here's the link:
subject: struggling with repeated values
It's not a secret anymore!