Implement Session Timeout screen

Hi All,

I have a requirement where I have to show a seperate Timeout page to the user when the session times out. This page is not same as the login page. I have used a flag to determine if the user has logged out or the session timedout and it is working fine. But I cannot find a way to forward to the time out page. Can anyone help me on this?

So far I tried to use a subtype of HttpSessionListener and implemented the sessionDestroyed method. I know that I can get a request dispatcher from the SessionEvent but I cannot forward using the request dispatcher because forward need Request and Response as params. If I send null, I get a NullPointerException.

I know we can use javascript but that not an option for me.

Any Ideas?

Thanks

Ornov

[787 byte] By [ornova] at [2007-10-3 9:49:16]
# 1

Sorry but i don't get the point.

-Do you want to forward the client to a special page (exactly) when is session is destroyed (if so, i thnik the only way is to use a javascript timer on the client side, to make a forward)

-Or do you want a separate login page for users whose session expired, not the newly loging users (if so, i don't see where the problem is, it's quit simple since you have the flag you spoke about)

alban.maillerea at 2007-7-15 5:06:17 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

I have login page and session timeout page when users log out by clicking a button they are forwarded to the login page - this is easy. But I need to forward the user to a timeout page if their session has timed out for example if the session was idle for 20 minutes. There should be a way to do this without using javascript

ornova at 2007-7-15 5:06:17 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
sorry, if there's no request from the client, there's no response from the server.there are many ways to achieve what you want, but only from the client side
alban.maillerea at 2007-7-15 5:06:17 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...