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?