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
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 11. Communicating with other por... > Inter-portlet communication using po...

11.3. Inter-portlet communication using portlet sessions

Inter-portlet communication using PortletSession is one of the most commonly used techniques since Portlet 1.0. In this section, we’ll explore PortletSession-based inter-portlet communication in the context of the Book Catalog and Recently Added Book portlets. We’ll also look at how content caching can affect PortletSession-based communication and how you can make use of portal server–specific features to make inter-portlet communication possible between portlets in different portlet applications.

Let’s see how the Book Catalog and Recently Added Book portlets can be set up to be part of the same portlet application so that they can communicate using portlet sessions. As we discussed in chapter 3, data stored in the PortletSession’s APPLICATION_SCOPE can be shared with servlets and portlets that form part of the same portlet application. All portlets belonging to a portlet application are defined in the same portlet deployment descriptor, so the first thing you need to do is to define the Book Catalog and Recently Added Book portlets in the same portlet.xml file. Portlets belonging to a portlet application must be packaged in the same WAR file, so you must create a single WAR containing the two portlets.


  

You are currently reading a PREVIEW of this book.

                                                                                        

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

  

Start a Free Trial


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