How can I set/retrieve a cookie from a portlet?
No you cant.There is no direct way to set/retrieve a cookie value from a portlet. Cookies are used a mechanism for session tracking. The portlet specification does not mandate the portal server to use any particular session tracking mechanism. In fact, the portal server is free to use whatever mechanism it chooses: Cookies, URL rewriting, Https Sessions etc. Portlet developers are expected to use the PortletSession object and leave it to the portal server to deal with the underlying mechanism.