Clear all sessions for web application in tomcat 7

Viewed 12783

I'm trying to update a couple of JAR files after my web application starts and doing a restart for the changes to take effect.(requirement) The problem is , the session information is being persisted by tomcat. Yes, I do have a "sessionEventListener" listener in my application, but that shouldn't be a problem IMHO.

I want everything to start afresh from tomcat ( running standalone) , be it sessions, cache, or any information about the web application given to tomcat, except for the WAR file of course.

Any help would be appreciated.

2 Answers

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

<Manager pathname="" />
Related