This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to reset password field?

 
Kousik Majumder
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Jhon Clay
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, It is not working...I have tried that one also...
 
Gowher Naik
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For action mapping(inside struts-config.xml) keep scope="request" for bean and also override rest method inside ActionForm.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Once you determine that the password is in error in your Action class, set it to blank before forwarding to the JSP.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic