How to Communicate between JSR168 Portlets on the Desktop

One method of communicating between portlets on the desktop is via the session object. Only problem is that each portlet has its own session. To get around this problem the JSR168 standard specifies a PortletSession that can have portlet or application scope. This example uses PortletSession with Application scope. Note that Application_scope has a value of 1 and the value is used in the example instead of the symbol. (I couldn't find the symbol class)

To create the demo you must create two new JSPPortlet Portlets in the console. For one of the Portlets specify for the content jsp: contentGet.jsp and the other one contentSet.jsp. Next add the portlets to the myfrontpagetabcontainer. Now copy contentGet.jsp and contentSet.jsp to var/opt/SUNWps/tmp/deploy/web-apps/https-/portletsamples/jspportlet

Back to Menu