You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Amol Upadhye <Am...@S1.com> on 2006/04/13 10:55:13 UTC

Post request to 'j_security_check' after tomcat restart or sessio n timeout produces error 400

Hi,

I am using Tomcat 5.0.28 and Form based authentication. 
Here are steps to produce my problem,
1. Access secured page -> tomcat forwards request to login page
2. Restart tomcat server or wait till session expires, keep login page as it
is, do not close browser window.
3. After tomcat restarts, with same login page try to login

In this case even if login information is correct tomcat throws error 400. 
This is because it looses the URL to which to forward to after
authentication.
What I want is to forward the request to the desired page (may be
preconfigured). 
Is there a way to configure so that control is forwarded to the configured
page in this case?
Current I have Error 400 handler in which if requested URL is
'j_security_check' then I redirect to the desired page (secured page). But
tomcat somehow doesn't keep authenticated principal and again presents login
screen.

Any help is very much appreciated.

Thanks,
Amol