aspose file tools*
The moose likes Servlets and the fly likes cleint disconnecting without logging out.... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "cleint disconnecting without logging out...." Watch "cleint disconnecting without logging out...." New topic
Author

cleint disconnecting without logging out....

mustang india
Ranch Hand

Joined: Feb 05, 2002
Posts: 60
HI,
I would like to know how to keep track of a browser bacsed cleint when he/she abruptly closes the connection with servlet. Let us say I have a browser based cient and a server running a servlet. I can understand the client logging out if he "logs out". My question is how can the server get notified if the client closes the browser window without logging out.
Thansk in advance.
Les Dsouza
Greenhorn

Joined: Jan 29, 2002
Posts: 27
The browser does not notify the server when the user closes the window.
Hence we need to depend on the session timeout to invalidate the users session. Another similar approach is to have a thread which will continuously monitor the users sessions (which need to be kept in a list or hashtable) any session that has not been active for a defined time can then be invalidated (after doing any process if necessary).
 
jQuery in Action, 2nd edition
 
subject: cleint disconnecting without logging out....