Wizard API updated!
Tim Boudreau has released a new version of the Swing Wizard library (version 0.997) that fixes the WizardException bug reported in JavaWorld's recent Open Source Java Project profile. The article's examples have been reworked to test out the new, improved WizardException. Thanks, Tim, for this helpful fix!
Open Source Java Projects: The Wizard API

Newsletter sign-up

Sign up for our technology specific newsletters.

Enterprise Java
View all newsletters

Email Address:

Introducing the Portlet Specification, Part 2

The Portlet API's reference implementation reveals its secrets

Enterprise portal vendors use pluggable user-interface components, known as portlets, to provide a presentation layer to information systems. Unfortunately, in the past each vendor defined its own portlet API, producing incompatibilities across the industry. To standardize the process, the Java community launched Java Specification Request (JSR) 168: the Portlet Specification.

Part 1 of this two-part series examined JSR 168 in detail. This final article focuses on the Portlet API's reference implementation (RI), also known as Pluto. The RI provides a working example portlet from which you can launch your own development efforts.

Read the whole series on the Portlet Specification:



This article's first section describes the RI's architecture, including the portlet container's plug-in concept and how to reuse the container in other projects. The second section explains how to install and use the RI, as well as how to quickly deploy portlets. The article concludes with a series of progressively more complex portlet examples.

Note: You can download this article's source code from Resources.

Pluto's architecture

Let's begin by examining Pluto's architecture and underlying concepts. First, we briefly explain the portal that runs the RI, and see where to find a portlet container inside a portal architecture. Next, we investigate Pluto's architecture in detail. Last, we look at how it solves one challenging item of the portlet container: portlet deployment.

The portal

Pluto normally serves to show how the Portlet API works and offers developers a working example platform from which they can test their portlets. However, it's cumbersome to execute and test the portlet container without a driver, in this case, the portal. Pluto's simple portal component is built only on the portlet container's and the JSR 168's requirements. (In contrast, the more sophisticated, open source Apache Jetspeed project concentrates on the portal itself rather than the portlet container, and considers requirements from other groups.)

Figure 1 depicts the portal's basic architecture. The portal Web application processes the client request, retrieves the portlets on the user's current page, and then calls the portlet container to retrieve each portlet's content. The portal accesses the portlet container with the Portlet Container Invoker API, representing the portlet container's main interface supporting request-based methods to call portlets from a portal's viewpoint. The container's user must implement the portlet container's Container Provider SPI (Service Provider Interface) callback interface to get portal-related information. Finally, the portlet container calls all portlets via the Portlet API.

Figure 1. The simple portal included with Pluto. Click on thumbnail to view full-size image.

The portlet container

The portlet container, the portlets' runtime environment and a core component of each portal, requires knowledge about the portal itself and must reuse common code from it. Consequently, the portlet container remains completely separated from every other portal component. That said, you can embed the standalone portlet container in any portal by complying with the portlet container's requirements, such as implementing all SPIs.

1 | 2 | 3 |  Next >

Discuss

Start a new discussion or jump into one of the threads below:

Subject Replies Last post
. How to access the portlet once deployed?
By Anonymous
2 04/30/08 07:59 AM
by Anonymous
. Error messages while trying to deploy war-File...
By Anonymous
6 04/28/08 08:06 AM
by Anonymous
. PLUTO released in CVS
By Anonymous
0 04/22/08 06:02 AM
by Anonymous
. How useless! How to install what you can't get???
By Anonymous
2 04/22/08 06:02 AM
by Anonymous
. Pluto.... sounds really basic
By Anonymous
0 04/22/08 06:02 AM
by Anonymous
. Reference Implementation?
By Anonymous
1 04/22/08 06:02 AM
by Anonymous
. evaluate-while-typing
By Anonymous
0 04/22/08 06:02 AM
by Anonymous
. User-Attributes
By Damian
0 04/22/08 06:02 AM
by Anonymous
. regarding link in portlet
By Anonymous
0 04/22/08 06:02 AM
by Anonymous
. Problems deploying bookmark1 example on Pluto
By Anonymous
1 04/22/08 06:02 AM
by Anonymous
. reg: IFramePortlet
By Anonymous
1 04/22/08 06:02 AM
by Anonymous
. Mars may be close but where is Pluto?
By Craig
7 04/05/08 05:58 PM
by Anonymous
. deployPortlet.bat ? where is it?
By ArijkA
0 03/25/07 02:52 PM
by Anonymous


Resources