Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

CookiesAware not setting cookieMap?

 
M Turner
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic