Reputation: 21200
I am not sure whether the session in Tomcat refers to a browser client?
If the browser client has multiple tab, does it refer to each individual tab?
Upvotes: 0
Views: 117
Reputation: 38789
Java EE Servlet spec describes a mechanism to associate all requests from a single browser with a shared Session object, this is the basis for tracking users. Session object lives on the tomcat server. Tomcat by default uses cookies sent from the browser to associate each HttpServletRequest with the Session object created for that browsers session. For each subsequent request the cookie is always sent allowing the same Session to be associated with the requests. By default that session last 30 minutes from the last request. Each request renews the Session's TTL so after 30 minutes of inactivity is can be reclaimed. This is configurable. For every tab you open in the same browser it's all the same Session because cookies in the browser are associated with the domain any of those tabs talk to. So new tabs won't get separate sessions.
Upvotes: 2