Alex Rex

Greenhorn
+ Follow
since Jun 21, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Alex Rex

Thanks again. We're a little late in the game for switching our authentication model, but I'll take that advice to heart in the future.

I've already got it set up to forward on the next request, but what I'm asking is for it to be automatically served. I know this can be achieved with the meta header:


but that doesn't play well with ajax, so that option is out.

This is something I know can be done, because every banking website does it. Your session times out and it redirects you to a login page without you having to request another page. This is a good thing for a page with sensitive information on it. So are they doing it the old meta tag way, or is there a better way I can do that?
13 years ago
JSF
Thanks for the info, that's very helpful. So supposing I wanted to automatically redirect to the log on page when the session expires, how would I do that?
13 years ago
JSF
I'm trying to implement a good way to handle a session timeout -> redirect. I'm using JSF 2.0, and have a basic HttpSessionListener and web.xml timeout limit, but I can't figure a way to redirect from the sessionDestroyed method.

The other thread I found on this indicated that redirecting on a session timeout is "bad design". But that's short sighted, there are many reasons to do it, consider your banking web site.

This is as close as I've come, with a faces context that maintains itself past the session destroy, but the redirect still doesn't work:



We initially used the deprecated:

<meta name="sessionTimeout" http-equiv="refresh" content="#{session.maxInactiveInterval};url=....." />

But we can't continue to use that, because a page that uses ajax won't refresh that time out.



So what is the conventional way to handle this?

Thanks.
13 years ago
JSF