The Portlet Interface

Tutorial 6 introduces the Portlet interface. This section covers:

Let's get started. From the JPortal distribution root directory, type:


maven -Dtutorial=6 jetspeed:deploy

Recommend bringing up these files in your editor:

  • 1. webapp/WEB-INF/conf/t6-portlets.xreg
  • 2. webapp/WEB-INF/psml/user/anon/html/default.psml
  • 3. webapp/WEB-INF/psml/user/turbine/html/default.psml
  • 4. src/java/org/apache/jetspeed/tutorial/portal/portlets/HelloPortletInterface.java
  • 5. webapp/WEB-INF/conf/JPortalJetspeed.properties

since we will reference them in tutorial 6.

Portlets generate content fragments (from the getContent() method) that are aggregated together in a portal page as shown below. Jetspeed takes the content generated by each portlet, and includes it in a portlet window. The location on the page for the portlet window is controlled by the administrator or user when customizing a portlet page. The Portlet interface is the contract between the portlet developer and Jetspeed defining how a portlet behaves and interacts with the Jetspeed environment.