This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
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

Win a copy of REST with Spring (video course) this week in the Spring forum!
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?
It's not a secret anymore!