| Author |
how to monitor how long the session is on
|
sarasah guna
Greenhorn
Joined: Dec 12, 2005
Posts: 10
|
|
hey , My promblem is that that session does not exprie becouse the the sesion is created when the page created .How do I monitor the session time as long the page is aceess.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56179
|
|
|
I do not understand what you are asking.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14672
|
|
I don't quite understand either, but do you mean HttpSession.getCreationTime() ?
|
[My Blog]
All roads lead to JavaRanch
|
 |
sarasah guna
Greenhorn
Joined: Dec 12, 2005
Posts: 10
|
|
|
I have jsp page where i have set the interval equal 1800 milisecond ..How to make keep trak of the interval time .Becouse my current page only find create time when the page is load .How to I make sure the session time is check when the user fill up the form.thank you.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56179
|
|
|
You should not be tryng to use the session as a timer. There's Javascript mechanisms for that.
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12267
|
|
The way to store a system timestamp in a session is to create a Long object like this: Long tstamp = new Long( System.currentTimeMillis() ); and store it in the session: session.setAttribute("lastaction", tstamp); (you have to use a Long because sessions only store object references) On subsequent requests you can recover the timestamp value and compute the number of milliseconds in the interval. Bill
|
Java Resources at www.wbrogden.com
|
 |
 |
|
|
subject: how to monitor how long the session is on
|
|
|