File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Best way to handle login varification Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "Best way to handle login varification" Watch "Best way to handle login varification" New topic
Author

Best way to handle login varification

Daniel Prene
Ranch Hand

Joined: Jul 15, 2005
Posts: 241
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
Ranch Hand

Joined: Jul 11, 2001
Posts: 15230

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.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel/download
 
subject: Best way to handle login varification
 
Similar Threads
radio button not working with panelgrid
Take input from <h:inputText> in rich <modalPanel>
values in one form dissapearing when editing another
JSF Error : cannot get value for expression
Property can't be found that's definitely there!