I need to end the session automatically when the user is inactive for some particular time say for 10 minutes. We have a method in
HttpSession session=reque
There is no way to intimate the server about the user closes the browser. That's why the sessions are having configurable timespan. If you wanna do it then try by creating a onclose javascript event and from there do an ajax call to intimate the session close to the server. In the server you can get the session id from this call as parameter and kill it.
I didn't tried it. Don't think it is right to do.