This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes Maintaining form data across pages... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Maintaining form data across pages..." Watch "Maintaining form data across pages..." New topic
Author

Maintaining form data across pages...

Ashraf Fouad
Ranch Hand

Joined: Oct 07, 2001
Posts: 80
Dears,

I am trying to setup a series of jsp pages (requestForm, confrimation jsp).

I set the scope of my requestForm to "session" as to maintain the data across the various jsps, but I get it as if reset is called, after the confirmation page submits

What is the best way to maintain the request data across several jsp pages, speically I have lots of pages as step 1, step 2, step 3 before submiting the action, with different form beans.


Thanks, best regards


Ashraf Fouad
SCJP 1.2, SCBCD 5
sreenath reddy
Ranch Hand

Joined: Sep 21, 2003
Posts: 415
Hi

Its a part of the framework that whenever u fire a request the reset method will be executed and then remaining things.........the default implemenattion of reset deosnt have anything

so if u wnat to maintain ur formdata across many pages ........keep that formbean in session scope and dont override that reset method .ie dont provode any implementation.........

i hope this will solve ur problem
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
u can use javabean + web session scope together


SCJA,SCJP,SCWCD,SCBCD,SCEA I
Java Developer, Thailand
Ankur Srivastava
Ranch Hand

Joined: May 11, 2004
Posts: 62
You can associate the same for bean to the different action classes or you can extend the form beans of the other action classes with the form bean which you need in the others and make the scope of this form bean as session
 
jQuery in Action, 2nd edition
 
subject: Maintaining form data across pages...
 
Similar Threads
Maintaining form data across pages
Session Issue
Maintain Data Across Errors
Design question
JSP/form/servlet - session persistence ?