JSP/Servlet : How do you get the time left in a session

S

Steve

Hey all;

How can you programmatically retrieve the time left in a JSP session?

Can it be programmatically reset?

Thanks in advance for any info
 
A

Arne Vajhøj

Steve said:
How can you programmatically retrieve the time left in a JSP session?

Can it be programmatically reset?

session.getLastAccessedTime() and session.getMaxInactiveInterval()
should give you the info you need.

When the JSP page is running it it has just started the countdown
over again and you can drop the session med session.invalidate(),
but I don't think you can choose some other value.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,436
Messages
2,571,696
Members
48,796
Latest member
Greg L.
Top