wood burning stoves
The moose likes Struts and the fly likes Form Action Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Form Action" Watch "Form Action" New topic

Form Action

Nicolas Flammel
Ranch Hand

Joined: May 05, 2004
Posts: 32
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

Joined: Feb 05, 2003
Posts: 4727

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

A good workman is known by his tools.
sreenath reddy
Ranch Hand

Joined: Sep 21, 2003
Posts: 415
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
I agree. Here's the link: http://aspose.com/file-tools
subject: Form Action
It's not a secret anymore!