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

Response Set cookie not available in Dispatcher

  • December 7, 2024
  • 4 replies
  • 820 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

AmitVishwakarma
New Participant
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.

arunpatidar
arunpatidarAccepted solution
New Participant
December 9, 2024
narendiran_ravi
New Participant
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.

PRATHYUSHA_VP
New Participant
December 7, 2024