Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 3. Portlet 2.0 API—portlet objec... > Storing user-specific data in a port...

3.4. Storing user-specific data in a portlet session

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.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint