Hi,
I am using JAAS authentication in a Struts 2 web application. A login form
looks like:
<s:form method="post" action="j_security_check">
<s:textfield label="User" name="j_username"/>
<s:password label="Password" name="j_password"/>
<s:submit value="Log In"/>
</s:form>
I need to validate password field before passing it to the authentication
service. Basically, I need to check that this field is not empty. Struts 2
suggests two ways for validation: either implement validate() method in
action or configure field validators in xml file. But in this case I do not
have a particular action, because j_security_check is something
container-dependent. What validation can be done in this case?
Thanks,
Daniil