Chapter 4. Portlet 2.0 API—caching, security, and localization

 

This chapter covers

  • Using expiration- and validation-based content caching
  • Localizing portlet labels and messages
  • Portlet modes and window states
  • Programmatic security
  • Uploading files using portlets
  • Using portlet request and response wrapper objects
  • Using the PortletURLGenerationListener interface
  • Designing portable portlets

In chapter 3, we discussed some of the common Portlet 2.0 API concepts and applied them to the example Book Catalog portlet. But we haven’t yet looked at how portlets can show localized content to users in different locales, cache content for better performance, make use of a custom portlet mode or window state for showing content, upload files, and so on. In this chapter you’ll see how Portlet 2.0 API concepts are applied to the Book Catalog portlet to use caching, show content in fr_FR locale, upload TOC files, and use custom portlet modes and window states. Portlets may also depend on portal server–specific APIs to achieve some of their features, so we’ll conclude this chapter by discussing how to design portlets so that they can easily be adapted to different Portlet 2.0–compliant portal servers.

4.1. Caching generated content

 

4.2. Localizing portlet content

 
 

4.3. Portlet modes in depth

 
 
 

4.4. Portlet window states in depth

 
 
 

4.5. Programmatic security

 
 
 

4.6. Uploading files, wrapping requests and responses, and creating po- ortlet URL generation listeners

 
 
 
 

4.7. Designing portable portlets

 

4.8. Summary

 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest