aspose file tools*
The moose likes JSF and the fly likes Best way to handle login varification Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
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
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

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.


GenRocket - A Test Data Generation Platform
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Best way to handle login varification
 
Similar Threads
Property can't be found that's definitely there!
JSF Error : cannot get value for expression
Take input from <h:inputText> in rich <modalPanel>
values in one form dissapearing when editing another
radio button not working with panelgrid