File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes client connection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "client connection" Watch "client connection" New topic

client connection

Rahul Agarwal
Ranch Hand

Joined: Sep 13, 2000
Posts: 52
well i am involved in a web project with a timer clock etc.
I want to see when exactly a client gets disconnected.
Disconnection may be either due to closure of webbrowser or
due to any type of dis connection.I want to trap time when this client gets disconnected.
I am using servlets,jdbc,sql server7.0,jawawebserver...
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
I guess you could have an invisible applet sending a request every N seconds and note when that tick fails to appear! Thats the only thing I can think of that would record a broken connection.
Sean MacLean
Ranch Hand

Joined: Nov 07, 2000
Posts: 621
I wonder if you use a javascript to capture the window close event, then upon getting this event, redirect to another page that calls a servlet to signal a disconnection. Just a thought.
I agree. Here's the link:
subject: client connection
It's not a secret anymore!