Chapter 5. Portlet Primer

5.1. JSR-168 and JSR-286 overview

The Portlet Specifications aims at defining portlets that can be used by any JSR-168 (Portlet 1.0) or JSR-286 (Portlet 2.0) portlet container. Most Java EE portals include one, it is obviously the case for JBoss Portal which includes the JBoss Portlet container supporting the two versions. This chapter gives a brief overview of the Portlet Specifications but portlet developers are strongly encouraged to read the JSR-286 Portlet Specification .
JBoss Portal is fully JSR-286 compliant, which means any JSR-168 or JSR-286 portlet behaves as it is mandated by the respective specifications inside the portal.

5.1.1. Portal Pages

A portal can be seen as pages with different areas, and inside areas, different windows, and each window having one portlet:

5.1.2. Rendering Modes

A portlet can have different view modes. Three modes are defined by the JSR-286 specification:
  • view - generates markup reflecting the current state of the portlet.
  • edit - allows a user to customize the behavior of the portlet.
  • help - provides information to the user as to how to use the portlet.

5.1.3. Window States

Window states are an indicator of how much page real-estate a portlet consumes on any given page. The three states defined by the JSR-168 specification are:
  • normal - a portlet shares this page with other portlets.
  • minimized -a portlet may show very little information, or none at all.
  • maximized - a portlet may be the only portlet displayed on this page.