the client's session is actually a sign of which browser your request came from
question 1: Is it always the same?
A : Restart the browser, your session ID will change,
The result is that the data that was previously saved on the server cannot be retrieved.
Issue 2: Assuming that the client's session ID is not changed (the browser does not restart),
so will the server keep the session data?
A : The service side (Tomcat) if There is no one moving,
then this session will be destroyed automatically.
For application throughout the project, there are only 1 variables, and all clients share the same Application object.
Only when the Tomacat is closed will application be destroyed.
the similarities and differences between Session attributes and application
1, session and application,request in Configuration Properties , code-like
2, session for each user (browser) is separate, and all users of application (browser) is a shared one. From the perspective of use, sharing the same 1 variables will cause a conflict of resource contention. (Most of the time you don't have to application)
3. The session server is saved by default of only a few minutes (can be modified), and application will persist until Tomcat off.
Similarities and differences between session and application in Java