11 Replies Latest reply on Jul 22, 2018 10:25 AM by Dave Watts

    J2EE setdomaincookies not working for JSESSIONID

    brandenj11524730 Level 1

      i need to maintain session data between sub domains


      you can do this easy by setting:



      works perfectly because the cfid and cftoken cookies domain is set to ".domain.com" instead of "whatever.domain.com"


      here is the problem. we are using J2EE sessions.


      so the cookie that we need to have its sub domain blank is the JSESSIONID


      this cookie is not set to ".domain.com" it remains "whatever.domain.com"


      if i try to manually create the cookies by setting setclientcookies to false a very odd thing occurs. when i set the value to session.sessionid, the resulting value is set to for example: " F29D7D74818F64478776A879964C7E05%2Ecfusion", see how it has replaced the "dot" with "%2E"


      i think this causes the brains to mark it as an invalid cookie so it creates another one, which then has its own valid value but does not work for us because its now its own session.


      i read some stuff about editing the jrun-web.xml to fix this one million years ago but i cant find that file on cf2016.