Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

How to reset password field?

 
Ranch Hand
Posts: 244
  • 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?
 
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: 244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, It is not working...I have tried that one also...
 
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.
 
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.
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic