Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.
SOLVED

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

Avatar

Level 2

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?

1 Accepted Solution

Avatar

Correct answer by
Level 10

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

View solution in original post

4 Replies

Avatar

Correct answer by
Level 10

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

Avatar

Level 10

This question has been passed to the AEM product team. 

Avatar

Level 2

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.

Avatar

Level 2

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.