It's not a secret anymore!*
The moose likes Struts and the fly likes Struts tags still show the values Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts tags still show the values" Watch "Struts tags still show the values" New topic
Author

Struts tags still show the values

Tim Storms
Ranch Hand

Joined: Apr 27, 2006
Posts: 64
In my JSP, when clicked on the following link:

it goes to the following servlet:

The page that it has to redirect to always has always been filled in before. When the page is shown, all the form fields should be empty. I tried to accomplish that in my servlet by deleting the form bean (userBean). But all the fields still have values so this appears not to be working. Is it so that the struts tags themselves remember the previously entered values? How can I make sure that the values are deleted when this page is shown?

Thanks for your advice!
[ November 27, 2006: Message edited by: Tim Storms ]

SCJP 1.5, SCWCD 1.4, SCBCD 5
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
It sounds like you have your actions configured to use session scope. In that case that is one use for the "reset" method on your form. Struts will call this method an you can set the values back to defaults.

- Brent
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Struts tags still show the values