Joakim,

It's easy to test for a live session (JSP code) :

 if(session == null) { response.sendRedirect("/logged-out.jsp"); return; }

You might want to read up on sessions and how to use them, for instance by
checking out Jason Hunter's book.
Obviously restarting the server destroys all current sessions...

Dave

----- Original Message -----
From: "Joakim Verona" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 27, 2000 8:00 AM
Subject: how do i recreate the user session after session timeout or server
restart?


> hello,
>
> i have an web-app which uses form login. This works well except when the
session times out or
> the server is restarted(due to a software update)
>
> the problem occurs when the user reloads a page from a no longer valid
session.
> tomcat then redirects the user properly to the form-login page.
> only problem, then, is that the user then is redirected to the original
page, which relies on a valid session.
>
> i could of course have the session initialization code in every page, but
this is error prone.
> is there some more elegant way, perhaps using some form of event handler?
(interceptor?)
>
> i think the basic problem is that i cant make the form-login system
actually do anything other
> than setting the username in the underlying session object.
>
> --
> Joakim Verona
> [EMAIL PROTECTED]
> http://www.verona.se/

Reply via email to