This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes JSP and the fly likes User timing in a session Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "User timing in a session" Watch "User timing in a session" New topic

User timing in a session

sk mehrotra
Ranch Hand

Joined: Oct 27, 2005
Posts: 34
I am using a JSP login page.
How do I keep track of the user timing from the logon to the logoff.

I would like to store this information in a database.

Can you help me on this.

[ February 27, 2007: Message edited by: sk mehrotra ]
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63873

Unless I'm missing something in your question this is fairly trivial. Store a timestamp in the session when the user logs in, compute the elapsed time when they log out, and store it in the DB.

The interesting part comes when: what if they don't log out?

(Hint: session listener)

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: User timing in a session
jQuery in Action, 3rd edition