This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan 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 Android Security Essentials Live Lessons this week in the Android 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
subject: CookiesAware not setting cookieMap?
Similar Threads
validation in struts2
migration to Struts2
Need Help - Struts2 s:select issue - Urgent
Struts2 Validation Not working
Interceptor messes up action class in Struts2