7
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Tomcatのセッションクッキー名(jsessionid)を変更する

Last updated at Posted at 2014-12-15

Tomcat 6.0.28以上の場合、セッションクッキー名をデフォルトのjsessionidから変えることができます。Tomcat全体で変更する場合は、$CATALINA_HOME/conf/context.xmlのContextタグにsessionCookieName属性を追加するだけです。

vi $CATALINA_HOME/conf/context.xml

<!-- <Context> -->
<Context sessionCookieName="yourCookieName">

cookieName.png

[参考]
Apache Tomcat 7 documentation
http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Attributes

Bug 45951 - Provide support for renaming JSESSIONID
https://issues.apache.org/bugzilla/show_bug.cgi?id=45951

7
6
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?