Furkan Zumrut

[Tutorial] How to change Tomcat 7 JSESSIONID

 

apache tomcat 7

Tomcat uses JSESSIONID as a default cookie name. And if we want to change this cookie name or customize cookie name ourselves, we have to follow the steps below.

1-) Open content.xml file which is located in {your tomcat7 root}\conf

2-) Find the <Context> part on your content.xml file.

3-) Change the sessionCookieName=”MyCookie” as you want to see.

<Context sessionCookieName="MyCookie">

    <!-- Default set of monitored resources -->
    <WatchedResource>WEB-INF/web.xml</WatchedResource>

    <!-- Uncomment this to disable session persistence across Tomcat restarts -->
    <!--
    <Manager pathname="" />
    -->

    <!-- Uncomment this to enable Comet connection tacking (provides events
         on session expiration as well as webapp lifecycle) -->
    <!--
    <Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
    -->

</Context>

4-) Save the content.xml and restart tomcat server.

More from my site

  • Tomcat 7 JSESSIONID nasıl değiştirilir?
  • tomcat 8080 is already in use hatası ve çözümü
  • Tomcat’te server adı nasıl gizlenir/değiştirilir?
  • Tomcat’te gzip nasıl aktif edilir?
  • Save your money shutting down EC2 Instance with AWS Lambda!
  • JSF resources oluşturumu ve kullanımı
change jsessionid tomcat, content.xml cookie
Tomcat

Recent Posts

  • How to run java jar in Elastic beanstalk with custom jvm parameters? (Procfile)
  • How to change timezone with ebextension in Elastic Beanstalk?
  • Save your money shutting down EC2 Instance with AWS Lambda!
  • Keep your Test Environment more stable with Pre-Branch
  • Getting Started with Scalate: Simple Web Application with Spring MVC

Medium

Pages

  • CV

Categories

  • Android
  • AWS
  • CXF
  • Devops
  • Genel
  • Java
  • Javascript
  • JAX-RS
  • JPA/Hibernate
  • JSF
  • Maven
  • Postgresql
  • Servlet
  • Spring
  • Tomcat

Archives

  • August 2017
  • June 2016
  • October 2015
  • June 2015
  • May 2015
  • April 2015
  • February 2015
  • December 2014
  • November 2014
  • October 2014
  • June 2014
  • May 2014
  • June 2011

Theme created by Mick de Graaf

age of civilization
tank stars