I'm using JBoss AS 5 and JSF+Seam for my web application. I'm using FORM authentication and have defined the login page in "login-config" tag in web.xml file.
I also have a filter which will check for the session expired condition and redirect the user to a session_timed_out page.
Now the issue I'm facing is that when the session expires in JBoss, the server redirects the user to login page without going to my filter. Because of this, when my filter is invoked (i.e. in the following flow: After Session Timout->Login page->user logs in ), there is a session exists and I can not trap the session expired condition.
Since I'm using JSF, I always get "View Could not be restored" exception when ever the session expires and the user logs in.
Any idea on how to stop the JBoss from redirecting the user to login page, when the session expires?
Best Answer
Remove section, and AS will have no idea where to send your user. Your request will go through your filter, and it will do its work.
You'll have to handle login form explicitly too, but this is not a rocket science.