wood burning stoves 2.0*
The moose likes Servlets and the fly likes Filter before login form in FORM based login Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Filter before login form in FORM based login" Watch "Filter before login form in FORM based login" New topic

Filter before login form in FORM based login

Luke Murphy
Ranch Hand

Joined: May 12, 2010
Posts: 300
I am using FORM based login. I go to a secured page, Tomcat redirects to a FORM login page. However, I have a filter I'd like to execute before the login page. I configure web.xml as such. But does not get executed. Why? Tomcat presumably skips filters for authentication challenges.

I know there is not a configuration problem as I can see the filters getting called when basic authentication happens. After the submit.

Is there any possible way to configure the application to ensure the filter gets called before the login page gets rendered? I know you can add a filter to j_Security_check but this is after the login page has been rendered and the form has been submitted.

Would be grateful to hear any ideas?

Madhan Sundararajan Devaki
Ranch Hand

Joined: Mar 18, 2011
Posts: 312

Please make the entry point of your application as this Filter.

Not many get the right opportunity !
subject: Filter before login form in FORM based login
Similar Threads
Need help in reporting of protected resources in web application
how to redirect to success page in tomcat using its lapd configuration
Form based authentication... URGENT pls.
can I have two login page using form-based authentication?
Form Based Authentication ....URGENT pls.