If the user closes the browser you will never know about it until the
session times out.


----- Original Message -----
From: Rashid Khan <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 17, 2000 2:00 PM
Subject: HOW TO HANDLE SESSION TIMEOUT???


> Hi All,
>
> I am designing a mechanism for session time out. That is my aim is to
check
> for the user idle time and logout the user if he is idle for say 30
minutes
> or if the user just closes the browser I need to kill the session after
some
> time. I am using weblogic as my webserver.
>
> The approach I have taken is to include the code below in the header.jsp
> which I am including in all my JSPs which I am using. This works fine as
> long as the user has not closed the browser. But if the user just closes
the
> browser than how do I kill the session. Please can someone suggest some
> smart way of doing this thing.
>
> <html><head><title>JavaScript Timeout Test</title></head>
> <body bgcolor="#ffffff">
> <form name="cdtime"><input type=text name="countdown" size=2></form>
>
>
> <script language="JavaScript"><!--
> var timer = 30;
> function countdown()
> {
>   if(timer > 0)
>   {
>     document.cdtime.countdown.value = timer;
>     timer -= 1;
>     setTimeout("countdown()",1000);
>   }
>   else
>
>   {
>     location.href="http://localhost:7001/logout.jsp";
>   }
> }
> countdown();
> // --></script>
> </body>
>
>
>
> Thanks in advance,
> Rashid
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to