I set the session time of the session.
<session-config> <session-timeout>11520</session-timeout>
</session-config>
Each time I close the browser and open it again, invoking the servlet, I see that a new session has been created. This can be seen from the SessionCreated method executed in the HttpSessionListener each time the browser is reopened.
I am new to tomcat / Java, but if I were working in ASP.NET, I would work on setting a cookie with the same name as the session name.
What is the best practice for working at Tomcat?
thank you in advance.
Danny
java cookies tomcat servlets session
danny.lesnik
source share