Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to kill the session on stopping of server

I have made a project in java, jsp, servlets. I have done the session management on login and logout processes. I am facing a problem here. When I do NOT logout from application and stop my apache tomcat server and restart it again, my session does not kill. I want my session to be vanished on stopping of server. Can I do this in some .xml configurable files inside apache tomcat directory?

like image 216
JPG Avatar asked Feb 10 '23 23:02

JPG


1 Answers

Simply add/uncomment below line in "%Tomcat_Home%/conf/context.xml"

<Manager pathname="" />

This will avoid saving sessions on server shutdown.

Disable Session Persistence

like image 167
Rajesh Avatar answered Feb 15 '23 10:02

Rajesh