4.10. Attribute storage summary

There are many objects in the portal environment for storing attributes. In order to help you choose the right object for the right situation, refer to the following chart.

ObjectScopeAttribute TypeProgrammatic AccessBest Practice
PortletRequestLimited to request between the portal server and the portletobjectgetAttribute() setAttribute() removeAttribute()Use a short term bucket for communication between portlet and JSP (ex: Portlet URI)
PortletSessionLimited to subsequent requests by the same user on the same concrete portlet instanceobjectgetAttribute() setAttribute() removeAttribute()Use as an open line of communication between requests. (for example Shopping cart)
PortletSettingsShared by all instances of the ...

Get IBM Rational Application Developer V6 Portlet Application Development and Portal Tools now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.