JSESSIONID on CQ5 conflicting with the non-Cq5 site which is in the same domain | Community
Skip to main content
Level 2
October 16, 2015
Solved

JSESSIONID on CQ5 conflicting with the non-Cq5 site which is in the same domain

  • October 16, 2015
  • 4 replies
  • 1381 views

Folks, 

    We are having issues with JSESSIONID. On the non-CQ5 site, we have JSESSIONID cookie set at the root level. Once the user comes to the CQ5 based site/pages, CQ5 overwrites this cookie with new value. Now when the user comes back to the non-CQ5 site, we see errors about the JSESSIONID as it was changed by CQ5.

 Can we configure CQ5 for not creating/overwriting the JSESSIONID cookie or if it does then create at a different path so that not to mess up with the non-cq5 site cookie.

Few things to we attempted to try -
1. We would rename the JSESSIONID cookie for CQ5 site, but we could not using either java script or using backend java code. Even if we try to do so, it creates a new cookie at the root level.
2. We can not modify the JSESSIONID on the functional site.

Can someone please suggest what should we be doing in this case?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Sham_HC

Make sure you are using session as false in all of your jsp script.
  <%@page session="false"%>

4 replies

Sham_HC
Sham_HCAccepted solution
Level 10
October 16, 2015

Make sure you are using session as false in all of your jsp script.
  <%@page session="false"%>

smacdonald2008
Level 10
October 16, 2015

This question has been passed to the AEM product team. 

vsharm3Author
Level 2
October 16, 2015

Thank you very much Sham HC. We did attempt to try this change (<%@page session="false"%>) to disable the session (as CQ site should be sessionless) but it did not seem to work for us. I talked to few folks and they also said that  having <%@page session="false"%> should be the solution. I will continue looking into it and see if we are missing anything. I will post the solution once I have this issue resolved.

vsharm3Author
Level 2
October 16, 2015

This issue is resolved by adding  <%@page session="false"%>. We had added the this entry in global.jsp but we had some jsp pages where global.jsp file was not included. By including global.jsp file in those jsp pages, we were able to resolve the issue and now the JSESSIONID cookie is not being created.

Thanks a lot for al your help.