Portlet tools overview
Rational Developer includes tools designed to help you develop portlet applications for WebSphere Portal. The portlet tools provide the following capabilities:
- Portlet project support for the IBM portlet API and the JSR 168 portlet API.
- Web perspective views and editors for developing portlets.
- Portlet project wizard to create basic portlets, Faces portlets, and Struts portlets.
- Editing and validation of the portlet deployment descriptor (portlet.xml)
- Testing and debugging of portlets within the workbench using the WebSphere Portal Test Environment .
- Testing and debugging of portlets on a remote machine using the WebSphere Portal Server Attach.
- Visual tooling to insert portlet programming objects into JSP files, using Page Designer.
- Portlet sample applications, available in the Samples Gallery.
- Educational tutorials, available in the Tutorials Gallery.
The following environments are supported for testing and debugging portlets:
- For the WebSphere Portal Test Environment (local testing and debugging)
- WebSphere Portal 5.0.2.x (Windows only)
- WebSphere Portal 5.1
- For WebSphere Portal Server Attach (remote testing and debugging)
- WebSphere Portal 5.0.x
- WebSphere Portal 5.1
Tool support
The following tools are provided to support development of your portlet applications:
- Portlet project
- Portlet application samples
- Web perspective
- New Portlet Project wizard
- Portlet deployment descriptor editor
- Portal server configuration
- Local server test and debug
- Remote server test and deploy
- Export to a Web Archive (WAR) file
Portlet project
Portlet projects are used for developing portlet applications in Rational developer. These projects contain all of the necessary resources for testing, debugging, or deploying a portlet. To create a portlet application, first create a portlet project using the New Portlet Project wizard.
For general information about portlet projects, see Creating portlets and portlet projects.
Portlet application samples
The Samples Gallery provides sample portlet applications to illustrate portlet development. You can examine these sample portlet application projects in your own development environment.
Creating a portlet application sample project is far simpler than creating one from scratch, because a wizard imports all necessary resources, including content, and the project is ready to run from your workspace.
For more information about the available portlet samples, select Help > Samples Gallery. Then, expand Technology samples and Portlet to view the following sample categories:
- Basic
- Faces Portlet
- Struts Portlet Framework
There are also portal application samples that incorporate portlets under Showcase samples and Application samples in the Samples Gallery.
Portlet tutorials
The Tutorials Gallery provides detailed tutorials to illustrate portlet development. You can build portlet application projects based on these tutorials in your own development environment.
To access the available portlet tutorials, select Help > Tutorials Gallery. Then, expand Do and Learn, and expand one of the following titles:
- Create a portal application
- Examine differences between portlet APIs
Web perspective
The Web perspective combines views and editors to assist you in developing portlet applications. Also it provides a wizard for creating portlet applications, and an environment for other portlet-specific operations.
New Portlet Project wizard
You can create a new portlet application by using the new portlet project wizards from the File > New > Project menu. Choose Portlet Project or Portlet Project (JSR 168), depending on whether you want to use the IBM portlet API or JSR 168 portlet API. The wizard that opens will prompt you to select one of the following portlet types:
- Empty portlet
- Basic portlet
- Faces portlet
- Struts portlet (for IBM portlet API only)
For more information, see Creating portlet projects (IBM API) or Creating portlet projects (JSR 168) for the Empty and Basic portlets. See Creating Faces portlet projects for information specific to a Faces portlet and Creating Struts portlet projects for information specific to a Struts 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 WebSphere Portal needs to install and configure the portlet. To learn more about the portlet deployment descriptor, see Working with portlet deployment descriptors. This 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 168 portlets.
Portal server configuration
Portlet 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 the test page and the debug page of your WebSphere Portal. Source-level debugging is also supported. For further information, see Defining servers for testing portlets.
To test and debug your portlet project, refer to Testing, debugging, or profiling portlets.
Test and deploy on a remote server
The capability to test or debug on a WebSphere Portal Server Attach (remote) server allows you to preview a portlet application during development. This is a dynamic view of the portlet application running on WebSphere Portal. When running on a remote server, use of this action will remove the necessity to manually build, install, and deploy applications to the remote WebSphere Portal. The preview automatically executes these operations for you. For details, see Testing portlets remotely. In previous versions of this product, this function was called portlet preview.
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.
Related concepts
Creating portlets and portlet projects
Portal development overview
Related tasks
Portlet applications
Developing portlets
Adding portlets to portal pages
Testing, debugging, or profiling portlets
Publishing portlets