简体   繁体   中英

How to disable redirection to login page in JBoss, when the session expires?

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 (ie 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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM