struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cohan, Sean" <SCo...@goSPS.com>
Subject DB hit from ActionForm Validate method
Date Fri, 06 Sep 2002 13:19:14 GMT
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
accessed.  

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)?  

Thanks.


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message