This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Struts and the fly likes form displaying the last value from the form bean? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "form displaying the last value from the form bean?" Watch "form displaying the last value from the form bean?" New topic
Author

form displaying the last value from the form bean?

Mona Tajik
Greenhorn

Joined: Apr 27, 2006
Posts: 11
Hi evryone..can anyone help me with my problem here? I have an AddUserForm bean that is used by the AddUserAction class. What it does is get the information about the user, validates it and add it to the database. After the data is successfully added the action will be forwarded to a JSP that list all available users.

My problem is when I try to add another user it displays the previous input information. Can anyone kindly give information on how to clear this without using the value="" in my JSP/html page? Where can I reset the value of my FORMBEAN to null or ""?

Thanks
Mona Tajik
Greenhorn

Joined: Apr 27, 2006
Posts: 11
Ok I've resolved this problem..I just set the scope="request" and all the input fields were set to null.
 
 
subject: form displaying the last value from the form bean?