Clear all sessions for a web application in tomcat 7

I am trying to update several JAR files after starting my web application and restarting for the changes to take effect. (requirement) The problem is that session information is stored by tomcat. Yes, there is a "sessionEventListener" listener in my application, but this should not be an IMHO problem.

I want everything to start anew with tomcat (work autonomously), be it sessions, cache, or any web application information provided by tomcat, except for the WAR file, of course.

Any help would be appreciated.

+4
source share
2 answers

During development (in Eclipse), I usually use the "Clean Tomcat Work Directory" option, which appears when you right-click on the "Servers" view. This will destroy all session related data.

+6
source

In your tomcat 7 context.xml you can add / uncomment this line to clear all sessions when tomcat reloads.

<Manager pathname="" /> 
0
source

All Articles