File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Time tracking Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Time tracking" Watch "Time tracking" New topic
Author

Time tracking

kiran mahavir
Ranch Hand

Joined: Jan 09, 2001
Posts: 35
Hello,
A site developed by me, delivers online courses. The problem is, I want to track the user, i.e I want to know the amount of time a user has spent on the lesson.Here I need to consider the following situations
-When the net is disconneted
-When the user closes the browser with out logging out.
(I have planned to implement using the session events and using the setMaxInactiveInterval method, which solves the problem.But in case if the user closes the browser, I wont be able to calculate the time accurately.
And the other problem if i use setMaxInactiveInterval is , in case of online tutorial we cant say how much time a user takes to read a page.
But if i do the above i cant get the exact time.
Is it correct to do this way?)
Please suggest a method for the above task
Thanx in advance
With regards
Kiran
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12675
    
    5
There is no way you can be absolutely sure of catching an event when the user leaves with plain HTML. For example he might just close the internet connection without closing the browser. You might use some sort of invisible Java applet or Javascript function that sends a "keep alive" request to the servlet every X seconds.
Bill

------------------
author of:


Java Resources at www.wbrogden.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Time tracking
 
Similar Threads
Ending a "specific" session
Session handling
perform a specific task on logout/closing of browser
Session
How to make user logout when user closes browser window?