HttpServletRequest‘s getSession(boolean) method mentions session integrity. How does Tomcat maintains session integrity? What rules does it use? What method? What is happening under the hood precisely?
EDIT
How and when is a specific session ID is created? Does Tomcat rely on IP address and port for example?
In Tomcat the
ManagerBase.generateSessionId()method is responsible for session id generation. It looks for me that session ids are generated based on random numbers. You can store the client’s IP address in the session and check it in your webapp but as far as I know Tomcat does not do that.About session integrity: could you define it, please? There is a paragraph about it in the Java Servlet Specification, Version 3.0 but it isn’t too much: