message.portlets
Class CookieSetterPortlet

java.lang.Object
  extended byGenericPortlet
      extended bymessage.portlets.CookieSetterPortlet

public class CookieSetterPortlet
extends GenericPortlet

This portlet sets a cookie with a session id that should be visible to all portlet applications on that portal. This portlet should be on the first page after log on, so it can set the cookie before any other messaging portlets render. It has to do this in the Render phase... so (annoyingly) you shouldn't put any messaging portlets on that page either. Used in combination with the CookieSessionIDRetriever, and an external MessageStore, this could be used quickly on any portal for testing out messaging between different portlet webapps. However, for production use it would be better to use a more robust (portal-specific) solution to set the session id.

See Also:
Serialized Form

Field Summary
protected static java.lang.String COOKIE_NAME
           
protected static java.lang.String SET_COOKIE
           
 
Constructor Summary
CookieSetterPortlet()
           
 
Method Summary
protected  void doView(RenderRequest request, RenderResponse response)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SET_COOKIE

protected static java.lang.String SET_COOKIE

COOKIE_NAME

protected static java.lang.String COOKIE_NAME
Constructor Detail

CookieSetterPortlet

public CookieSetterPortlet()
Method Detail

doView

protected void doView(RenderRequest request,
                      RenderResponse response)
               throws PortletException,
                      java.io.IOException
Throws:
PortletException
java.io.IOException