struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Galbreath, Mark" <>
Subject RE: DB hit from ActionForm Validate method
Date Fri, 06 Sep 2002 13:32:31 GMT
Store and increment the logon attempts in a session variable and track it in
your LogonAction class.  Define the appropriate messages in and error paths in struts-config.xml. Place
an HTML:Errors tag in an appropriate place in the Logon.jsp to display the

And you should not be accessing the db directly from an Action class - pass
the user params to a VO, Stateless Session EJB, or DAO and have one of these
objects return.


-----Original Message-----
From: Cohan, Sean []
Sent: Friday, September 06, 2002 9:19 AM
To: 'Struts Users Mailing List'
Subject: DB hit from ActionForm Validate method

We need to implement '3 strikes and your out' functionality to our logon
process.  If the user is unsuccessful after 3 logon attempts, we disable
their account.  I put some of the user id / password functionality in the
validate method of the LogonForm class.  However, in between each attempt, I
need find out what number of logon attempt they are on, and if this is not
their 3rd attempt, bump up the logon attempt number. If it's their second
attempt and they fail, I  need to let them know they only have 1 ore chance
to get it right.  If they successfully logon, we also need to show them how
many attempts it took them to logon the last time their account was

We were thinking we'd store their current and previous logon attempt number
in the DB.  My question is whether it is acceptable or common practice to
access the DB from the validate method or should DB access only be done in
the LogonAction class (which means I'd move the perform functionality to the
LogonAction class)?  


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message