Tomcat saves the sessions even if I stop application!!!
Achchan Chaghi
Greenhorn
Joined: Jun 16, 2006
Posts: 9
posted
0
Hi all, I have deployed a web application and now whenever I stop it from tomcat/manager and restart it shows the number of whole previous sessions (right now it is 7 ) I reload the context but no chance. Again stop/start application and it does not help too. Is this a bug? Have you ever encountered it? -Thanks
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35241
7
posted
0
Sessions are persisted, unless you tell Tomcat not to do that. Search for "expireSessionsOnShutdown" in the conf/server.xml file - you'll find an explanation where to set it to "true". Then you will no longer have old sessions around after a restart.
Thanks Ulf, I read the server.xml comments but It seems that it is for clustering tomcat.I have a really simple app and want to keep it simple. Any suggestion? -Your help is really appreciated.