Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Struts and the fly likes CookiesAware not setting cookieMap? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "CookiesAware not setting cookieMap?" Watch "CookiesAware not setting cookieMap?" New topic

CookiesAware not setting cookieMap?

M Turner

Joined: Dec 16, 2009
Posts: 25
I'm using the following blog post on using cookies in Struts 2

So I'm implementing CookiesAware in the following way:

However, in my Action's execute() method when I test the value of cookiesMap it's is null. I have also put a breakpoint in the setCookiesMap() method and have found that it never gets called.

Finally, I have looked at the struts-default stack and noticed that CookieInterceptor is not part of the default stack. Do we need it in order for CookiesAware to work?

M Turner

Joined: Dec 16, 2009
Posts: 25
Oops - I read the example too fast. The blogger states..

Both options need the CookieInterceptor to be configured for the action that needs to receive cookies.

Hope this helps someone
I agree. Here's the link:
subject: CookiesAware not setting cookieMap?
jQuery in Action, 3rd edition