File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Portals and Portlets and the fly likes Adding Cookies with a Portlet 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 » Java » Portals and Portlets
Bookmark "Adding Cookies with a Portlet" Watch "Adding Cookies with a Portlet" New topic

Adding Cookies with a Portlet

Guy deLyonesse
Ranch Hand

Joined: Apr 12, 2011
Posts: 200

Hey all,

So I'm attempting to store cookies from within a portlet to be read by a separate application (same domain).

Here's the code that creates and adds the cookie:

But the cookie doesn't seem to be making it. I'm watching in the browser (Firefox Page Info) as well as a little portlet I write that displays cookies, attributes, etc. and it's not there. No error messages... just no cookie.

Any thoughts?
It is sorta covered in the JavaRanch Style Guide.
subject: Adding Cookies with a Portlet
It's not a secret anymore!