Creating Portlets

If the pre-built portlets in the Portlet Library do not match your current needs, you can create new portlets in a variety of ways, including through the use of the Portlet Wizard.

A new portlet can be associated with an existing resource, or created first and associated with a resource later. The Portlet Wizard is invoked in the WebLogic Workshop IDE anytime you perform one of these operations:

Types of Portlets Created by the Portlet Wizard

The Portlet Wizard can create several types of portlets. The portlet type is set on the wizard's first screen; when generating a portlet for an existing resource, the type may have been already detected.

Type Description
JSP/HTML Portlet Creates a portlet that points to a JSP or HTML file for its content. These types of portlets can be simple to implement and deploy, and provide basic functionality without a lot of complexity. However, business logic and presentation layer can get combined in the JSPs; as the application grows, this often leads to escalating maintenance costs while trying to update the webapp and share code. This type of portlet is not well suited for advanced portlet navigation.
Java Portlet Creates a JSR 168 compliant portlet. This creates a Java file. Accommodates portability for portlets across platforms. Does not require the use of portal server specific JSP tags. The behavior is similar to a Servlet (although there are differences). For related information, see "Developing JSR 168 Portlets with WebLogic Portal 8.1" on the BEA dev2dev site. This type of portlet is intended for software companies and other enterprises that are concerned with portability across multiple portlet containers. Current disadvantages are that this type of portlet does not leverage BEA advanced portlet features, and this type requires a deeper understanding of the J2EE programming model.
Java Page Flow Portlet Creates a portlet that uses Java Page Flows to retrieve its content. Allow you to separate the user interface code from navigation control and other business logic. Provides the ability to model both simple and advanced portlet navigation. Allow you to leverage other resources such as Java Controls and Web Services. Provides a visual IDE environment to build rich applications based on Struts. The advanced page flow features are not necessary for static or simple, one-view portlets.
Struts Portlet Creates a Struts-based portlet.
Remote Portlet Creates a WSRP-compliant remote, or "proxy," portlet. These portlets present content collected from WSRP-compliant producers, allowing you to leverage external sources for portlet content, rather than have to create this content or its framework yourself.

The following topics describe the options you have while generating these types of portlets.

Related Topics

Building Portlets