Response Set cookie not available in Dispatcher | Community
Skip to main content
December 7, 2024
Solved

Response Set cookie not available in Dispatcher

  • December 7, 2024
  • 4 replies
  • 822 views

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.

4 replies

PRATHYUSHA_VP
Community Advisor
Community Advisor
December 7, 2024
narendiran_ravi
Level 6
December 7, 2024

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.

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
December 9, 2024
AmitVishwakarma
Community Advisor
Community Advisor
January 17, 2025

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.