aspose file tools*
The moose likes Tomcat and the fly likes Tomcat 7 session.invalidate() doesn't work when setting sessionCookiePath= Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat 7 session.invalidate() doesn Watch "Tomcat 7 session.invalidate() doesn New topic
Author

Tomcat 7 session.invalidate() doesn't work when setting sessionCookiePath="/" in context.xml

cc won
Greenhorn

Joined: Dec 14, 2011
Posts: 1
Hi,

I am trying to assign a new session id after user login by calling session.invalidate() method.

In JAVA_HOME/conf/context.xml as following:

<Context sessionCookiePath="/">
</Context>

The above configuration doesn't re-new session id when session.invalidate() is called in the Servlet.

If remove sessionCookiePath="/" in in JAVA_HOME/conf/context.xml as following:

<Context>
</Context>

By calling session.invalidate() method, a new session id will be assigned.

Is there a workaround or missing configuration.

Thanks
 
wood burning stoves
 
subject: Tomcat 7 session.invalidate() doesn't work when setting sessionCookiePath="/" in context.xml