Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Portlet containers provide the PortletSession object so you can store user-specific data across portlet requests. PortletSession is similar to HttpSession, and it provides methods to maintain session attributes, get and set the maximum interval of time for which the session can remain inactive, get PortletContext, and so on. Just as each web application has a unique HttpSession per user, each portlet application has a unique PortletSession per user.
In this section, we’ll look at PortletSession scopes, PortletSession methods, and when to use which scope when developing portlets. We’ll also look at how the Book Catalog portlet makes use of PortletSession scopes and methods to achieve its intended functionality.