File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Best way to handle login varification

 
Daniel Prene
Ranch Hand
Posts: 241
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a login form that collects a username and password then calls the 'login' method of the backingbean. How should I handle failed attempts? I'd like to be as descriptive as possible and not have to redirect the user to a different page. Right now I have the following set up:



Should I be doing the password/username varification in a validator? Seems risky...

Thank you for your time,
-D.P.

[ January 20, 2006: Message edited by: Daniel Prene ]
[ January 20, 2006: Message edited by: Daniel Prene ]
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could create your own validator for login. I don't know what you mean by risky though.

The way I usually do it is in some business logic. My login method just calls my own means of authentication which is usually a helper class that hits the DB for credentials. If anything fails, I simply navigate to the same login page and display an appropriate error message on that screen.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic