wood burning stoves 2.0*
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
Author

CookiesAware not setting cookieMap?

M Turner
Greenhorn

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

http://omkarp.blogspot.com/2007/07/working-with-cookies-in-struts2.html

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?

Thanks,
Marcella
M Turner
Greenhorn

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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: CookiesAware not setting cookieMap?