aspose file tools*
The moose likes JSP and the fly likes recording time when the user closed browser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "recording time when the user closed browser" Watch "recording time when the user closed browser" New topic
Author

recording time when the user closed browser

as chhipa
Greenhorn

Joined: Sep 04, 2006
Posts: 26
Hi everybody,
I want to know if there is any mechanism is JSP through which we can detect the time when user closed the browser window so that we can record the logout time in database. It will be very nice if you can provide the sample code also.
Thank you.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

There is nothing in JSP for this.

There is no reliable way to know when a user closes a browser from the server.
  • Http is a stateless protocol
  • Computers crash.
  • Network connections dissapear.
  • Browsers can be configured to do or not do lots of things.
  • Users could type new URLs in the browser's address bar.


  • [ September 27, 2006: Message edited by: Ben Souther ]

    Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: recording time when the user closed browser