Configuration of JSESSIONID cookie set by CQSE
Hello,
I have an AEM instance that uses Day-Servlet-Engine/4.1.52 (CQSE) and I would like to customize the JSESSIONID cookie.
Currently CQSE sets the JSESSIONID like this:
so the domain of the cookie is set to the current domain by the browser, ex. www.example.com.
However I would like to set the domain to .example.com, so the cookie would be available to all sub-domains of the example.com.
It looks like the solution would be to switch the CQSE servlet containter to another one that supports configuration of cookies, like newer versions of tomcat (http://stackoverflow.com/questions/82645/best-way-for-allowing-subdomain-session-cookies-using-tomcat).
When I tried to send 2 cookies with the help of a filter, one to override the existing JSESSIONID and another one which is the same JSESSIONID with the desired domain, the servlet engine adds the third JSESSIONID cookie, and the response headers look like this:
This is error-prone, and I was wondering if there are better solutions for adding the domain of the JSESSIONID cookie.
Any help will be very appreciated!