File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to reset password field?

 
Kousik Majumder
Ranch Hand
Posts: 237
  • 0
  • 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
  • 0
  • 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: 237
  • 0
  • 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
  • 0
  • 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
  • 0
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic