How to disable redirect to JBoss login page when session expires?

I am using JBoss AS 5 and JSF + Seam for my web application. I use FORM authentication and have defined the login page for the "login-config" tag in the web.xml file.

I also have a filter that checks for an expired session condition and redirects the user to the session_timed_out page.

Now the problem that I am facing is that when the session ends in JBoss, the server redirects the user to the login page without going to my filter. Because of this, when my filter is called (i.e., in the following thread: after a Timout-> Login page-> session, the user logs in), there is a session, and I cannot delay the termination condition.

Since I use JSF, I always get a โ€œView Could not restoreโ€ exception when the session expires and the user logs in.

Any idea on how to prevent JBoss from redirecting the user to the login page when the session expires?

+3
source share
1 answer

Delete the partition, and AS has no idea where to send your user. Your request will go through your filter and it will do its job.

You will also have to handle the login form explicitly, but this is not rocket science.

+1
source

Source: https://habr.com/ru/post/1713935/


All Articles