Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Form Action

 
Nicolas Flammel
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a jsp with a submit button which gets results to disply in a List from the action class. The action related with this submit button is an action class that fetches the results. The forward element in the mapping loads the same jsp page but along with the results appended in the same page somewhere below.

How can this be accomplished??
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are we displaying just one set of results or do more and more results get listed each time the form is submitted?

At high level, either method will require:
1) Set the values in the ActionForm or to a scope level
2) Have the jsp check if the values exist in the ActionForm, and if so, display them
 
sreenath reddy
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the same jsp where u r planning to display the results give a conditional loop like logic:exists name="req attribute" isnide this iterate through the results else it wont enter..........

but in ur action class throw back to the same page via forward and that list should be in request scope r should form a part of ur actionform
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic