• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Best way to handle login varification

 
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
No. No. No. No. Changed my mind. Wanna come down. To see this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic