Store and increment the logon attempts in a session variable and track it in your LogonAction class. Define the appropriate messages in ApplicationResources.properties and error paths in struts-config.xml. Place an HTML:Errors tag in an appropriate place in the Logon.jsp to display the messages.
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. Mark -----Original Message----- From: Cohan, Sean [mailto:[EMAIL PROTECTED]] 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 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:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

