Java Portlet Specification

Last updated

The Java Portlet Specification defines a contract between a portlet and its container; it provides a convenient programming model for Java portlet developers. Multiple versions of the specification, each a Java Specification Request (JSR) document, have been released with each intended to define an improved technology compared to the previous version.

Contents

A Java portlet resembles a Java servlet but produces fragments rather than complete documents, and is not bound by a URL.

Versions

V1.0

Version 1.0 was developed under the Java Community Process as JSR 168 and released in its final form in October 2003. [1] It introduced the portlet programming model with:

Two phases of action processing and rendering
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.
Packaging format
To group different portlets and other Java EE artifacts needed by these portlets into one portlet application which can be deployed on the portal server.
Portal development
As a way to integrate the different web-based applications for supporting deliveries of information and services.
Portlet catalog
A set of ready-to-use components for a portal. Initially, Java portal vendors developed incompatible portlet frameworks and thus use of those portlets were confined to specific portal servers. With JSR 168, Java portlets could be developed for deployment on any conforming Java portal server. A catalog makes sure that portlets under this catalog may run on any standards–compliant Java portal server. Types of portlet solution (vertical domains and technology) like collaboration, social networking, community, content management, utility, calendaring, HRM all are available in these catalogs. There are many open source and commercial portlet catalogs available but JSR-168-based solutions are rare. JSR 168 offers suitability to the developers to reuse the code to maintain a set of JSR-168-compliant portlets.

V2.0

JSR-286 is version 2, developed under the JCP and created in alignment with the updated version 2.0 of WSRP. It was released in June 2008. [2] It was developed to improve on the short-comings of the version 1.0 specification, JSR-168. Some of its major features include: [3]

Inter-portlet communication via events and public render parameters
Serving dynamically generated resources directly
Serving AJAX or JSON data directly
Filters and listeners

V3.0

JSR-362 is version 3, released in April 2017. [4] Some of its major features include: [5]

Resource Dependencies
Explicit Render State
CDI 1.2 Integration
Servlet 3.1 Alignment
Portlet Hub & XHR IPC
FacesBridge Integration via JSR 378 [6]

See also

References

  1. "JSR 168". JCP.
  2. "JSR 286: Portlet Specification 2.0".
  3. Hepper, Stefan (18 March 2008). "What's new in the Java Portlet Specification V2.0 (JSR 286)?". IBM.
  4. "JSR 362: Portlet Specification 3.0".
  5. Nicklous, Martin (Scott) (September 2016). "Portlet Specification 3.0 is Here!" (PDF). IBM.
  6. "The Java Community Process(SM) Program - JSRs: Java Specification Requests - detail JSR# 378". www.jcp.org.