The Portlet specification will define a Portlet API that provides means for aggregating several content sources and applications front ends. It will also address how the security and personalization is handled.
Portlets are web components -like Servlets- specifically designed to be aggregated in the context of a composite page. Usually, many Portlets are invoked to in the single request of a Portal page. Each Portlet produces a fragment of markup that it s combined with the markup of other Portlets, all within the Portal page markup.
The Portlet specification will define the different components for Portal Computing, their interaction, lifecycle and semantics. These components will comprise -but they will not be restricted to-: Portlets, Deployment descriptor, Portlet APIs. In addition, APIs for vendor extensions, APIs for security, user customization and layout management will be considered. Also, it will define the minimum set of possible window states for a Portlet such as normal, minimized, maximized, etc.-, the valid state transitions and Portlet modes (such as view, edit, help, configure) per markup language.
This first version of the Portlet specification will concentrate in the following design goals:
- Client agnostic
- Support for multiple types of clients (multi-device)
- Simple Portlet API
- Support for Localization and Internationalization
- Hot deployment and re-deployment of Portal applications
- Declarative security (same as to the mechanism found in Servlet and EJB specs)
- Architected to support remote execution of Portlets
The Java Portlet Specification V1.0 introduces the basic portlet programming model with:
- two phases of action processing and rendering in order to support the Model-View-Controller pattern.
- portlet modes, enabling the portal to advise the portlet what task it should perform and what content it should generate
- window states, indicating the amount of portal page space that will be assigned to the content generated by the portlet
- portlet data model, allowing the portlet to store view information in the render parameters, session related information in the portlet session and per user persistent data in the portlet preferences
- a packaging format in order to group different portlets and other J2EE artifacts needed by these portlets into one portlet application which can be deployed on the portal server.
JSR-286 is the Java Portlet specification v2.0 as developed under the JCP and created in alignment with the updated version 2.0 of WSRP. It was developed to improve on the short-comings on version 1.0 of the specification, JSR-168. Some of its major features include: