Maintaining form data across pages...

Jason Rosenblum

here's an example: you have an HTML form. after it is filled out the user previews the results on a second JSP and then chooses to submit or edit the HTML form again. If the user submits, then he is forwarded to a confirmation page. In order to process this you do: 1) cache ActionForm in session after form submission. 2) I pass my Customer bean to the preview page via request. I was able to construct a Customer bean by calling a toXXXX() method in my ActionForm (e.g. toCustomer). 3) on the confirmation page i query the database and return the results as a Customer bean passed via request. I also clean out session using removeAttribute(). I hope that helps...

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.