Lifetime of a Session
Use
The lifetime of a session is marked by the session creation. A session is created in one of the following cases:
-
The client requests the servlet for the first time, and the servlet requires that a session is created.
-
The client requests the application after the session that he or she was associated with has timed out or invalidated;
After the session is being activated, information about client activities across the application is stored in it.
The end of the session lifetime is forced in some of the following cases:
-
The session is invalidated by the servlet.
-
The session timeout period that you have set for the application in the <session-timeout> tag of the deployment descriptor has passed since the session was last accessed.