Skip to main content
Dec 7, 2024 2:34 PM UTC
Solved

Response Set cookie not available in Dispatcher

Hi,

 

Using AEM as a cloud. Setting cookie in servlet response object.  Cookie is not available in dispatcher.

 

Any Dispatcher level config do i need to do.

 

Thanks.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
arunpatidar
arunpatidarAccepted solution
Community Advisor
Dec 9, 2024 8:20 AM UTC

4 replies

PRATHYUSHA_VP
Community Advisor
Community Advisor
Dec 7, 2024 5:48 PM UTC

Hi @manojinimo2 

 

Did you get a chance to look at this community post -

 

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/setting-a-cookie-through-dispatcher/td-p/650998

 

Hope this helps

 

Thanks

Translate
Prathyusha - AEM Developer
narendiran_ravi
Level 6
Dec 7, 2024 6:01 PM UTC

If you’re setting a cookie as part of your servlet's response object, it should be passed to the browser.

Could you confirm if you’ve set any specific path for the cookie?

If possible, please share the code snippet where the cookie is being set. This will help in understanding if any other parameters (like domain, path, or expiry) are affecting its behavior.

Translate
arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
Dec 9, 2024 8:20 AM UTC
AmitVishwakarma
Community Advisor
Community Advisor
Jan 17, 2025 5:51 PM UTC

Hi @manojinimo2 

# In dispatcher.any, add this to allow cookies:

/filters { /0001 { /type "allow" /url ".*" } }

# Ensure Cache-Control headers prevent caching of dynamic pages that use cookies.

# Check for cross-domain issues and ensure SameSite cookie settings are correct.

# Review Dispatcher logs for errors related to cookies.

Translate
Amit Vishwakarma - Adobe Commerce Champion 2025 | 17x Adobe certified | 6x Adobe SME