Portlet APIs
WebSphere Portal supports portlets using the IBM portlet API and portlets using the JSR 168 portlet API. Rational developer tools support the development of both types of portlets. This section provides you with some information to decide which API to use when you develop portlets.
IBM portlet API
IBM portlet API is the portlet API that was initially supported for WebSphere Portal V4.x, and will be supported in subsequent versions.
JSR 168 portlet API
JSR 168 is a Java specification from the Java Community Process that addresses the requirements of aggregation, personalization, presentation, and security for portlets running in a portal environment. Portlets that conform to the JSR 168 specification are more portable and reuseable, because they can deployed to any JSR 168-compliant portal. Rational Developer supports Faces portlet development based on the JSR 168 specification.
Note: Click-to-Action cooperative behavior and portlet messaging are not supported in JSR 168 Faces portlets.
The IBM portlet API extends the servlet API and many of the main interfaces (request, response, session). JSR 168 API does not extend the servlet API, but shares many of the same characteristics. JSR 168 leverages much of the functionality provided by the servlet specification, such as deployment, classloading, Web applications, Web application life cycle management, session management, and request dispatching.
Deciding which API to use
For new portlets, consider using JSR 168 when the functionality it provides is sufficient for the portlet's needs or when the portlet is expected to be published as a Web Service for Remote Portlets (WSRP) service. WSRP is another portal-based standard used to integrate the presentation of remote portlets provided as Web services into the local portal page. The concepts in JSR 168 and WSRP have been aligned to allow JSR 168 portlets to be published as Web services. Some of these concepts include portlet modes and states, URL and namespace encoding, and the handling of transient and persistent information. If the portlet needs more functionality than that provided by JSR 168, the IBM portlet API should be used.
Additional information on the API differences can be found in the Examine differences between portlet APIs tutorial in the Tutorials Gallery (Help > Tutorials Gallery > Do and Learn).
Future directions for WebSphere Portal JSR 168 support
IBM will provide further enhancements to the JSR in follow-on versions to make the JSR 168 portlet API as useful as the current IBM counterpart. IBM is committed to wider adoption of open standards in WebSphere Portal, including JSR 168, JSP Standard Tag Library (JSTL), and WSRP.
Related tasks
Creating portlet projects (IBM API)
Creating portlet projects (JSR 168)
Related reference
WebSphere Portal Information Center
Comparing the JSR 168 Java Portlet Specification with the IBM Portlet API
Best practices: Developing portlets using JSR 168 and WebSphere Portal V5.02
JSR 168 Portlet Specification
Web Services for Remote Portlets
A Standard Tag Library for JavaServer Pages