You can do this strictly client-side, if requiring Javascript isn't a
problem (which of course an AJAX-based solution does anyway). Just
start a timer from the onLoad event on each page. When 20 minutes has
elapsed, you can either pop an alert which is followed by a redirect to
some appropria
I did an AJAX version of this a couple of months ago.
The slight gotcha is that the AJAX request prolongs the life of the
session (you can't, it seems, override the cookie for AJAX requests) so
the interval has to be slightly longer than the expiry time for the session.
Reynir Hubner wrote:
-
Hi Mark,
Is there any way to allow servlets to auto-logout a user when the timeout
has been reached.
We solved the problem slightly different.
We use a rather small timeout for the session (say 10 minutes) and put a
small iframe (nearly hidden, just changing colors) on the page where we
use a
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi,
I would suggest that you do this by using somethinglike JSON or AJAX.
See jasonspec: http://www.crockford.com/JSON/index.html
You could make the client query your server, in some interval and check
the session state.
hope it helps
- -reynir
Ma
> From: Mark [mailto:[EMAIL PROTECTED]
> So there is no way to provide this functionality using just
> servlets :(
You could sort-of hack something together using meta-refresh directives
on the pages so that the browser knew to refresh the page just as the
server timed out the session, but you n
So there is no way to provide this functionality using just servlets :(
On 11/14/05, Darryl L. Miles <[EMAIL PROTECTED]> wrote:
>
> Mark wrote:
>
> >Is there any way to allow servlets to auto-logout a user when the timeout
> >has been reached. Right now, I have tomcat configured for a 20 minute
>
Mark wrote:
Is there any way to allow servlets to auto-logout a user when the timeout
has been reached. Right now, I have tomcat configured for a 20 minute
session timeout. When the session times out, the user gets no notification
of this event. Is there any way to show the user that they have l
Is there any way to allow servlets to auto-logout a user when the timeout
has been reached. Right now, I have tomcat configured for a 20 minute
session timeout. When the session times out, the user gets no notification
of this event. Is there any way to show the user that they have logged out?
Tha