From the picketbox source code, I see any login exception is saved in the Security Context. But how do I access this from the JSP?
If you want to get hold of the exception thrown by the web server for your servlets, then the Servlet spec expects that you check for the attribute "
javax.servlet.error.exception" in the request object:
final Throwable t = (Throwable) request.getAttribute("javax.servlet.error.exception");
You can find more details about it in the Servlet spec
Thank you for your response. But isn't the control directed to form-error-page defined in web.xml if there is a JAAS LoginException? I suppose it'll not reach any servlet in case of a LoginException. I tried a scriplet in the form-error-page as you suggested. But its giving me null if I try the following in the form-error-page jsp.
Throwable t = (Throwable) request.getAttribute("javax.servlet.error.exception");
Should I try anything else?