aspose file tools*
The moose likes Struts and the fly likes How to reset password field? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to reset password field?" Watch "How to reset password field?" New topic
Author

How to reset password field?

Kousik Majumder
Ranch Hand

Joined: Sep 30, 2007
Posts: 227
Hello Guys,

I am new in struts world. I have a login page in my project and I want to reset the password field if the username and password is wrong.

I have implemented reset function in Action form.I have not used validation.xml file.
Can somebody tell me how to reset the password field after invalid login without using validation.xml and using validation.xml both?


Thanks in Advance,
Kousik
Jhon Clay
Greenhorn

Joined: Jul 16, 2007
Posts: 16
I'm a begginer too..
There is a reset() method in ActionForm which you can use.
Just make the corresponding form parameter to null.It will be reset
Kousik Majumder
Ranch Hand

Joined: Sep 30, 2007
Posts: 227
No, It is not working...I have tried that one also...
Gowher Naik
Ranch Hand

Joined: Feb 07, 2005
Posts: 643
For action mapping(inside struts-config.xml) keep scope="request" for bean and also override rest method inside ActionForm.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Once you determine that the password is in error in your Action class, set it to blank before forwarding to the JSP.


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to reset password field?
 
Similar Threads
Password Reset Via Email
Validation of String Array
How to make text fields appear when checkbox is selected
Struts 2.1.8 validation.xml & internationalization
Cannot load a validator resource