Suppose I have a web app with a servlet defined in web.xml.
Then I deploy it on Tomcat.
Then I open my browser and go to the link to this servlet, it is invoked.
Then I close my browser window.
How Session behaves ? How is it created, destroyed in this case?
if this servlet is "detached" from all the web app, and gets parameters only using post & get, so it does not need Session at all, should one use Session.invalidate at the end of doGet(), doPost() ?