HTTP Session object is not working in AEM Dispatcher. | Community
Skip to main content
Level 3
May 19, 2023

HTTP Session object is not working in AEM Dispatcher.

  • May 19, 2023
  • 2 replies
  • 1416 views

Hello,

 

We have an implementation where we want to preserve the session at the back end using an HTTP session object. 

Example: we have 3 pages, we need to preserve the options selected on each page and display that option chosen on the results page.

Note: We don't have the login functionality. Every user is an anonymous user.

 

This implementation works fine in both the author and publisher but not the dispatcher. I know that the use of an HTTP session is not recommended in AEM but we have to use it to accomplish our use case.

Any thoughts here, on why the HTTP Session object is not working in the dispatcher?

 

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

2 replies

Ritesh_Mittal
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
May 19, 2023

Hi @sateeshkreddy ,

 

Just trying to understand the requirement, cant we use client side storage (local storage or session storage) instead for this requirement.

 

Level 3
May 19, 2023

No @ritesh_mittal , We have a restriction to use frontend session.

Ritesh_Mittal
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
May 19, 2023

@sateeshkreddy  Are you getting session object as NULL?

DPrakashRaj
Community Advisor
Community Advisor
May 19, 2023

Do you have more than one publisher for your setup?

i believe you need to change your implementation strategy, with HTTP session you might not be able to cache the HTML and best way to implement it via front end code like local or session storage and if you are not allowed to use this in your project then may be you can look for URL with query prams or sling selector to have dynamic nature of the page based on your use case