Does the functionality of the IPC demo help? It's on portletswap.
but not recommended for what you want.
for cookies : search in the forum. I have posted about that a few mounth ago.
search for how to retrieve and use the httpservletrequest.
(but really not recommended...).
see the Inter portlet communication (IPC).
should be a better way.
or directly using JBoss Messaging (I remember to have read that it will be in standard jboss in version 5).