Filter is not possible. AFAIK you can not use filter before j_security_check in 
Tomcat...

-----Original Message-----
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Monday, August 15, 2011 4:50 PM
To: Tomcat Users List
Subject: RE: j_security_check and RequestDispatcher forward

> From: Chen Paz [mailto:chen....@expand.com] 
> Subject: j_security_check and RequestDispatcher forward

> I am using a servlet to intercept form based authentication in order 
> to insert attribute into the request and then to redirect the request
> to j_security_check using RequestDispatcher.

I wouldn't expect that to work, due to the special handling requirements of 
j_security_check, in particular that the container remember the original 
request of the protected resource and replay it automatically when 
authentication is successful.

What you might want to try is a filter rather than a servlet, and have the 
filter modify the j_security_check request when it comes through.  (Not 
completely sure that's possible, either.)  Another option is to use a 
ServletRequestListener to manipulate requests as needed.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to