Sharing Session Among Portlets

IBM WebSphere Portal Server way
Put these lines for each portlet in web.xml file.
<init-param>
<param-name>com.ibm.wps.portlet.session</param-name>
<param-value>shared</param-value>
</init-param>

JSR 168 way
In the JSR 168 spec the <init-param> does not exist So to share attribut among portlets two scopes from the PortletSession object can be used :

PortletSession.PORTLET_SCOPE
PortletSession.APPLICATION_SCOPE
and use portletSession.setAttibute(attName, attValue, scope)
with thanks to Benjamin Mestrallet of 'eXo' fame

Comments

Popular posts from this blog

Web Clipping for Portals goes Mainstream

Firebase upgraded properties are not yet supported in Google Analytics App

App Worth Calculator - App Price Estimator