All,
Ok, here's what I am currently attempting to do.
1.)I have a
JSP with multiple text fields and a couple of selection boxes and a submit button.
2.)The user fills in all of these fields in the JSP and hits a submit button.
3.)An ActionForm collects the inputted values from the different fields and an Action class does some stuff with these values. (This all works great)
4.)After the Action class does what it has to do successfully it will then forward to another JSP page that informs the user that the action completed successfully. (This works great too)
5.)The user then has the option of using a link to return to the previous JSP with the text fields, selection boxes, and submit button.
(Here's my problem) I want this JSP's text fields to be cleared and its selection boxes to have their default values shown when I return to it from this other JSP.
I am doing some validation on the input when the user submits the data. Basically, if the user does not enter something into a few specific fields then after they press the submit button
struts will refresh the page and display the errors. ALL previously entered fields must retain their values here, hence why I can't use a request scope for the action. It is only after I return to this form from another JSP do I want all the fields to be reset.
I am not sure how to make this happen. I have tried many things with no success so far. I know the solution is most likely simple but I don't see it and my attempts to find an example on the web have come up miserably short. Please help if you can.
Thank you,
Chad Schmidt