| Author |
session scope problem
|
shailesh kumar
Ranch Hand
Joined: Jul 18, 2005
Posts: 36
|
|
Hi All, I have 4 diffrent jsp's(with form fields), when user enters all the data in 4 jsp's information and then submits he is redirected to success page. On the success page the user has link to first page to start again. Since Iam using struts and the bean scope is seesion all the values in the text boxes have been retained. I have to set this to session scope bcz the user can go back and forth. How can clear all the fields when the user starts again. Any thoughts would be appreciated.
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26192
|
|
Shailesh, Add a method to your form called clearFields() [or something similar.] Then you can call this method before displaying the first page for the first time or right after the user submits and you get the data. It is important to add a new method rather than using reset() because reset() will take effect between the pages of your form as well.
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
 |
|
|
subject: session scope problem
|
|
|