tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Balanoiu" <Paul.Balan...@Siatel.RO>
Subject Re: User LogIn/LogOut
Date Thu, 17 May 2001 11:05:09 GMT
HTTP is a request-based protocol. This means that you cannot detect if the
user just closes the browser.
You can do one of the following:
1. Set the Session expiration time to a custom value (usualy is set to 30
min.) This value is the maximum precision you get for detecting user logout.
Don't set the value too low (if the user does not send any request for this
period of time, i.e. goes to have a cup of coffe, the session will be
invalidated and the user will have to login again).
2. (not recommended) Use an applet in the webpages, to keep the session
alive (i.e. the applet should send a HTTP request to the server per minute,
and the session timeout could be set to two minutes). This way you'll know
that if the session timed out, then the user simply closed the browser).

Paul

----- Original Message -----
From: "RamNivas" <rnivas@ablindia.com>
To: <tomcat-user@jakarta.apache.org>
Sent: Friday, May 17, 2002 1:34 PM
Subject: User LogIn/LogOut


Dear All,

I am having Tomcat Running on WinNT4.0.

i want to track the user loggins and logouts  time  for inserrting in
database.Using jsp how can i track the time user closes the browser or
logout .
i tried using JSP distroy method . but i'm having some troubles with htat
can someone send me a working example of JSP distroy or any good method of
tackling this problem
regards  Ram




--
To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>



--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message