File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Head First Android this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to reset password field?" Watch "How to reset password field?" New topic

How to reset password field?

Kousik Majumder
Ranch Hand

Joined: Sep 30, 2007
Posts: 234
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,
Jhon Clay

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: 234
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.

Consultant, Sima Solutions
I agree. Here's the link:
subject: How to reset password field?
It's not a secret anymore!