Create portlets and portlet projects
Portlet projects
The main difference between a portlet project and a Web project is that the portlet project has an extra deployment descriptor...
WEB-INF/portlet.xmlTwo types of portlet projects.
- JSR 286
Supported by WebSphere Portal V7.x or later and WAS 6.1 or later.
- JSR 168
Supported by WebSphere Portal V5.0.2.1 or later and by WAS 6.1.
- IBM:
Contains resources for portlet applications that use the IBM portlet API.
To create a portlet project, use the New Portlet Project wizard.
To enable Web 2.0 features, click Show advanced settings, this will take you the project facets page. Select the Web 2.0 checkbox to apply the Web 2.0 facets. Web 2.0 enables support for:
- AJAX Proxy
- Dojo Toolkit
- Server-side technologies
A project facet is a specific unit of functionality that you can add to a project when that functionality is required. When a project facet is added to a project, it can add natures, builders, classpath entries, and resources to a project, depending on the characteristics of the particular project. Web 2.0 facets define the characteristics of your Web 2.0 enabled portlet. The Web 2.0 facets specify the requirements and constraints that apply to your portlet project.
Portlet Type
You can select one of the following portlet types:
- Empty portlet:
Creates a portlet application and a portlet entry on the portlet deployment descriptor. A skeleton portlet class is also created. To complete the portlet application, you need to update the portlet class.
- Basic portlet:
Creates a portlet application that extends a portlet class: the Portlet Adapter class of the IBM portlet API, or the GenericPortlet class of the JSR 168 portlet API. This portlet type contains the portlet class, sample JSP files that are used in rendering the portlet, and a sample Java bean.
Several programming patterns are used in the portlet, including:
- Forms handling
- Storage of data items in the Portlet Session or Portlet Request
- Use of beans
- Tag library
In addition, you can optionally add the following programming patterns using the wizard:
- Action handling
- Message handling
- Storage of Portlet Data or Portlet Preferences
- Single sign-on support
- Multiple markups
- Multiple portlet modes
- Faces portlet:
Faces (JavaServer Faces) portlets are available both for the IBM portlet API and the JSR 168 and JSR 286 portlet API. Faces portlets only support J2EE 1.3 or higher and can be deployed to WAS V6.1, or later.
- Struts portlet: Struts portlets are available both for the IBM portlet API and the JSR 168 portlet API.
✓ supported. * supported without JSR 286 events. **supported without WebSphere Portal specific features. X not supported.
JSR 286 JSR 168 API IBM portlet API Portlet Type Faces portlet Struts portlet Basic portlet Empty portlet Faces portlet Struts portlet Basic portlet Empty portlet Faces portlet Struts portlet Basic portlet Empty portlet WebSphere Portal V6.0 Not available Not available Not available Not available ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ WebSpherePortal V6.1 ✓ * X ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ WebSpherePortal V6.1.0.1 with WAS V6.1 ✓* X ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ WebSpherePortal V6.1.0.1 with WAS V7.0 ✓* X ✓ ✓ ✓ ✓ ✓ ✓ X ✓ ✓ ✓ WAS V6.1 X X X X ✓** X X ✓** X X X X WAS V7.0 ✓*/** X X ✓** X X X X X X X X
Related concepts
Creating Faces portlets and projects
Creating Struts portlets and projects
JavaServer Faces portlet applications