I'm working web project that I need to check if user is already logged in login page, I know that I can create an class that implements ServletContextListener and its in contextInitialized method, I create a map that the key is id of user, for example. But my question is, How am I going to control this when user close the browser?
Thanks