This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am using Tomcat to host a site developed using JSP and Java beans. Whenever a user logs into this site a session is created and is terminated when the user presses log out button. There is a problem however, that the session remains active if the user closes the browser without logging off. I am aware that HTTP is a stateless protocol, but I would like to find out if there is a way by which I can detect whether the client is still connected to the website or moved on so I can invalidate his session.