How to close the http session on closing the web browser

Hi,

i am using struts 1.3.10 , i want to close the http session on closing the web browser.
Bharath Reddy GandluruAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
leakim971Connect With a Mentor PluritechnicianCommented:
set it to expire every 5s for example and in your page, use ajax to increase the expire time
once your page is closed, your ajax stop increase the time

else you can use onbeforeunload but it don't work all time, this is a very bad solution
0
 
mcnuteCommented:
http://struts.apache.org/2.x/primer.html#http

Here it says to use this method to set your interval for sessions:

setMaxInactiveInterval()

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.