• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java struts

 
sibasish padhi
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I want to populate an error message while a login is invalid .Can anyone please tell me the steps which I have to follow. I am using Struts . so plz reply me back soon.
 
alan do
Ranch Hand
Posts: 354
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
there are 2 ways:
1. add a ActionMessage() to your Globals.MESSAGE_KEY (where ActionMessages are stored (if you don't know how to do this, you need to look it up)

2. throw an exception that is of type/extends java.lang.Exception upon failed validation and map the exception to an action/jsp that states login failed (ideally, it should return the user to the same login form). again, you need to know how to configure struts to handle exception thrown.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic