How to check if FORM Realm authentication failed?

Posted by Sergio del Amo on Stack Overflow See other posts from Stack Overflow or by Sergio del Amo
Published on 2009-06-22T16:14:55Z Indexed on 2010/04/26 19:53 UTC
Read the original article Hit count: 383

Filed under:
|
|

I use FORM Authentication.

<login-config>
    <auth-method>FORM</auth-method>
    <form-login-config>
       <form-login-page>/loginPage.jsp</form-login-page>
       <form-error-page>/loginPage.jsp</form-error-page>
    </form-login-config>     			
</login-config>

I would like to use the same JSP for my form-login-page and form-error-page, for sake of code reuse. I use a Realm ( org.apache.catalina.realm.JDBCRealm ).

In my JSP, I would like to display error messages if the authentication failed. Does Realm store anything in the request, which I could check?

© Stack Overflow or respective owner

Related posts about realm

Related posts about authentication