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 Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp and javascript!!

 
vivek sivakumar
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have 2 beans which check the user name and pass word , is it possible to give a window.alert() message if the authentication fails in the bean like if user enters a false pass word!!
give me ur suggestions pls!
 
Heath Lilley
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Short answer is yes.
Long answer...
1. Redirect the failed login back to the login.jsp page...
2. Setup a js function that is written only when the error is present, something like...

3. Then do this with the body tag.

This worked for me.
good luck.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic