Is changing the “session-timeout” param in web.xml the only way to end a user’s session without clicking on the Logout button?
Is there any other way to log a person out when he closes the browser?
Thanks for your help.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To log a person out when the browser is closed would require a Javascript function to make an ajax request.
This really is not possible, because if you execute a javascript function for
onunloadoronbeforeunloadthen the script will execute every time you navigate away from the page as well.Bottom line is that even if you could figure out a way to do this, it is not a good idea.