Developing portlet

The Rational® Software Delivery Platform includes tools designed to help you develop portlet applications for WebSphere® Portal and WebSphere Application Server. The portlet tools provide the following capabilities:

Tool support

The following tools are provided to support development of your portlet applications:

  • Portlet project
  • Portlet application samples
  • New Portlet Project wizard
  • Portlet deployment descriptor editor
  • Portal server configuration
  • Portal server test, debug, and deploy
  • Import from a Web Archive (WAR) file
  • Export to a Web Archive (WAR) file
  • Visual tooling to insert portlet programming objects into JSP files, using Page Designer.
  • Cooperative portlet wizards
  • Business process message access
  • Personalization wizard
  • JSR 301 JavaServer Faces portlet bridge
JSR 286 provides additional capabilities over JSR 168, that allows you to add, update, and delete the following:
  • Events
  • Public render parameters
  • Serve Resource
  • Resource bundles
  • Filters
  • Filter mappings
  • Listeners
  • Container runtime options
  • Custom portlet mode
    • Portlet level cache scope
    • Portlet level processing events
    • Portlet level publishing events
    • Portlet level public render parameters
    • Portlet level container runtime options
    • Portlet level window state support for the mime type

Portlet project

Portlet projects are used for developing portlet applications in the product workbench. These projects contain all of the necessary resources for testing, debugging, coding, or deploying a portlet. To create a portlet application, you must either create a portlet project using the New Portlet Project wizard, or import a portlet WAR file using the Import wizard.

For general information about portlet projects, see Creating portlets and portlet projects.

New portlet project wizard

You can create a new portlet project by selecting File > New > Portlet Project. The type of portlet you can create depends upon the version of Websphere Application Server or WebSphere Portal you have targeted. In the wizard, you can choose to create a portlet based on either the IBM portlet API, the JSR 168 portlet API, or the JSR 286 portlet API. The wizard that opens will prompt you to select one of the following portlet types:

  • Empty portlet
  • Basic portlet
  • Faces portlet

For more information, see Creating portlet projects (IBM portlet API) or Creating portlet projects for the Empty and Basic portlets. See Creating Faces portlet projects for information specific to a Faces portlet.

Portlet deployment descriptor editor

A Portlet project has two configuration files: the portlet deployment descriptor (portlet.xml) and the Web application deployment descriptor (web.xml). The portlet deployment descriptor contains the information that either WebSphere Portal or WebSphere Application Server needs to install and configure the portlet. To learn more about the portlet deployment descriptor, see Working with portlet deployment descriptors. The portlet deployment descriptor editor helps you to specify deployment information in the Portlet deployment descriptor. It can also validate the portlet.xml file. To learn more about this editor, see Customizing IBM API portlets or Customizing JSR portlets.

Portal server tooling

Portal tools provide an additional type of server configuration, called the portal server configuration, which contains the server configuration information needed to publish your portlet application on a WebSphere Portal machine. After it is published, your target portlet will appear on a preview page of your WebSphere Portal server. Source-level debugging is also supported. For further information, see Defining local servers or Defining remote servers for testing portlets.

To test and debug your portlet project, refer to Testing and debugging portlets.

Rich Page Editor

You can use Rich Page Editor to easily edit JSP files, add Dojo widgets pages, and create and edit portlet JSP files. Rich Page Editor is a multi-tabbed editor that provides multiple views to show different representations of your portlet page. It is the default editor. It uses embedded browsers to produce a visual representation of a page in the Design view. For more information, see Customizing portlets with Rich Page Editor.

Maven projects

You can Maven framework to automate the build process. Maven assists in application development by combining the build requirements and standards into one system that is customizable, and provides common APIs, which can be learned once and deployed company wide. You can move away from writing custom Ant scripts to building Maven commands that can be duplicated and reused. Maven solves many build problems by standardizing dependency management, artifact repositories, project archetype structures and schemes. For more information, see Developing Maven portlet projects.

Importing and exporting to the Web Archive (WAR) file

Since a portlet application project is a J2EE-compliant Web application, you can import resources from a WAR file to your project by selecting File > Import, and you can export resources in your project to a WAR file by selecting File > Export.


Feedback