Expand my Community achievements bar.

Jsession id is getting generated for each request

Avatar

Level 2

Hi All,

Recently we upgraded to AEM6.2 from AEM6.1, in AEM6.2 Jsession id is getting generated for each page request but not on AEM6.1.

We have written a code like, when the user logs in successfully we put the user object to Http session. Since the Jsession id is getting generated for each page request we are losing the user object.

The same code is working fine on AEM6.1, but not in AEM6.2.

Could you tell me what could be the problem.

--

Thanks,

Pavan Bukka.

2 Replies

Avatar

Level 10

can you post code you are using. Something seems wrong here. First off, using HTTP sessions with AEM is not considered best practice. 

Avatar

Level 2

Hi,

The following code which set the visitor object in session slingHttpServletRequest.getSession().setAttribute("visitor", visitor); when the visitor logs in.

Since the JsessionId is changing for every page request, we are loosing this object.

Please suggest me the best way to maintain the data across the session.

--

Thanks,

Pavan Bukka.