Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

servlet to detect browser closing

843841Jan 12 2006 — edited Jan 14 2006
if a user closes a browser instead of clicking on something like "logout", then, how the servlet can detect that the user exits out the application, and update the database accordingly, for example, the time the user spent for that application?

i tried to use javascript, onunload, but it will trigger every back, refresh, and any link clicking event. so i'm wonder, if there's a way a servelet can detect it directly.

thanks a lot.

cc
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 11 2006
Added on Jan 12 2006
3 comments
127 views