Sun Java System Portal Server 7.1 Developer's Guide

What is a Portlet?

Portlet refers to pluggable web components that process requests and generate content within the context of a portal. Conceptually, portlets are equivalent to the providers. The portlets process requests coming from the portal and generate content for inclusion on the desktop. The portlets generate dynamic content and interact with web clients through a request and response paradigm.

The portlets only generate markup fragments and not complete documents. The portal aggregates portlet markup fragments into a complete portal page. Portlets are not directly bound to a URL; they have URL rewriting functions to create hyper links within their content. Portlets have predefined portlet modes (VIEW, which is mandatory, EDIT, and HELP, which are optional) described in their deployment descriptor and window states that indicate the function that the portlet performs and the amount of real estate in the portal desktop. They can store transient data in the portlet session in two different scopes: the application-wide scope and the portlet private scope.

In the Sun Java System Portal Server software, portlets are managed by a Portlet Container. The Portlet Container manages portlets in the same way that the web container manages servlets. The portlet container manages the life cycle of the portlets within the Portal Server. The life cycle refers to the creation, operation, and destruction of the portlets. The portlet container is also responsible for routing the incoming requests to the correct portlet. The portlet container also provides a persistent storage mechanism for the storage of portlet preferences. The portlet states for Portal Server are hardcoded in the portlet container and is not extensible.