1

In earlier versions of ColdFusion it was possible to rename the JSESSIONID by modifying jrun-web.xml How is it possible in ColdFusion 10 on a Windows server?

Adding either

-Dorg.apache.catalina.SESSION_COOKIE_NAME=MYID
-Dorg.apache.catalina.SESSION_PARAMETER_NAME=myid

or

-Dorg.apache.catalina.JSESSIONID=SID

to the JVM Arguments under Server Settings > Java and JVM does not seem to work.

Miguel-F
  • 13,450
  • 6
  • 38
  • 63
Bernhard Döbler
  • 1,960
  • 2
  • 25
  • 39

1 Answers1

3

I had originally posted this as a comment but upon researching I may have stumbled upon the answer.

ColdFusion 10 is installed with a modified version of Tomcat - Reference 1: What’s the deal with Tomcat in ColdFusion 10?

Is the inbuilt server in ColdFusion 10 a modified version of Tomcat? If yes, what are the changes and why?

Yes, the in-built server in ColdFusion 10 is a modified version of Tomcat. When we started out, we didn’t envision making any changes in Tomcat, but soon we realized that people would need seamless experience when they move from ColdFusion 9 or a previous version to ColdFusion 10. That meant that the directory structure, the features, connector experience - all need to be as close to previous versions (JRun as inbuilt server) as possible.

It appears as though the modified Tomcat version for ColdFusion was originally built on Tomcat version 7.0.23 - Reference 2: Getting Started with Tomcat in ColdFusion 10

In ColdFusion 10 ,JRun which was bundled with earlier versions of ColdFusion has been replaced with Tomcat. ColdFusion 10 now runs on Tomcat 7.0.23.

Version 7 of Tomcat no longer has the SESSION_COOKIE_NAME or SESSION_PARAMETER_NAME properties (which at least explains why the arguments you added did not work) - Reference 3: Tomcat 7 Session cookie configuration

With the addition of SessionCookieConfig in the Servlet 3.0 specification, a number of session cookie configuration options have been removed to reduce configuration and code complexity.

  • Connector.emptySessionPath: This has been removed. An equivalent effect can be obtained by configuring sessionCookiePath="/" in the global context.xml (in CATALINA_BASE/conf/context.xml).
  • org.apache.catalina.SESSION_COOKIE_NAME system property: This has been removed. An equivalent effect can be obtained by configuring the sessionCookieName attribute for the global context.xml (in CATALINA_BASE/conf/context.xml).
  • org.apache.catalina.SESSION_PARAMETER_NAME system property: This has been removed. An equivalent effect can be obtained by configuring the sessionCookieName attribute for the global context.xml (in CATALINA_BASE/conf/context.xml).
  • Context.disableURLRewriting: This has been removed. An equivalent effect can be obtained by configuring the session-config/tracking-mode elements in a web application or in the global CATALINA_BASE/conf/web.xml file.

Notice that information states that you can get an equivalent effect by configuring the new sessionCookieName attribute of the global context.xml file (in CATALINA_BASE/conf/context.xml). So you should be able to do something like this in that file:

<Context path="/your_uri" sessionCookieName="my_id">

Reference 4

Community
  • 1
  • 1
Miguel-F
  • 13,450
  • 6
  • 38
  • 63
  • 1
    +1. Good find. I was wondering if it might have something to do with Tomcat's config. – Leigh Oct 22 '14 at 16:45
  • Thanks for the reply. I'll see how it works out. I don't know about the `path` attribute but since posting I read about the `sessionCookieName` attribute and saw a cookie with the name specified is actually being set. The Coldfusion `Session.session` variable still contains the string `jsessionid` but it does not seem to influence the identification of the server. – Bernhard Döbler Oct 22 '14 at 19:00
  • I actually changed the file `D:\ColdFusion10\cfusion\runtime\conf\context.xml` – Bernhard Döbler Oct 22 '14 at 19:02