Server based portal implementations (such as WebSphere® Portal Server) dynamically generate portal aggregator JSPs using portal configuration information provided by portal application developers. The Lotus® Expeditor platform does not have such dynamic support, and requires the portal layout information to be specified in the aggregator JSP (using the HTML table element) with the packaged application before deployment.
The HTML table model allows application developers to arrange Portlets into rows and columns of cells. Using this model, multiple Portlets can be rendered on a single aggregator JSP page which can be viewed either in the Lotus Expeditor browser or an external platform browser.
To create a JSP page that aggregates multiple Client Services Portlet applications, perform the following procedure:
- Select a Client Services Portlet or Web project where you wish to add the aggregated JSP.
- Right click the Client Services Portlet or Web project and select New > Other > Web > JSP File to create a new JSP file. Create the new JSP file in the Web Content directory of the project.
- Open the JSP file in the JSP editor if it does not already open in the editor.
- Ensure that the Palette view for the JSP is visible. If the Palette view is not available, then select Window > Show View > Other > Basic > Palette to display the view.
- Use the actions in the HTML category in the Palette to create the HTML content in the JSP. Add an HTML table to the JSP page to create a framework for the layout of your perspective. Note that you are expected to configure your HTML layout before and after adding the Portlet content into the JSP.
- Select a table cell in the JSP editor and select the Add Portlet to JSP action in the Client Services category from the Palette.
- The Add Portlet to JSP action dialog is displayed to the user. The following table explains the various options of the dialog:
Table 1. Add Portlet to JSP Dialog
|Servlet Mapping ||Select the servlet mapping that will handle your aggregation JSP request||List of available servlet mappings defined in the selected project's Web Deployment Descriptor|
|Select different project ||Allows the selection of a different project to add Portlets||Provides a list of available Client Services Portlet projects in the user's workspace|
|Portlet||Select the Portlet you wish to add (or aggregate) to the JSP||List of available Portlets that are defined in the selected project's Portlet Deployment Descriptor|
|Portlet Variables||Portlet variables that are required to generate JSP code that will aggregate the Portlet into the JSP||None|
- Click Finish to insert the code that will insert the Portlet in the table cell of the JSP. Repeat the steps to add additional Portlets in other cells within the table.
- The add Portlet code will be compiled and built with the JSP and you can test and debug the aggregated JSPs by right clicking on the JSP and selecting the Run on Server method.
The Portlet aggregation function is not available for all types of projects and on all platforms. For example, the Portlet aggregation functionality provided by the Lotus Expeditor Portlet Tooling is not supported on the WebSphere Application Server Toolkit platform. To use this function and aggregate Portlets, you must install the Lotus Expeditor Toolkit into the Rational® Software Delivery Platform.
In addition, you can only use the Portlet aggregation function with the following types of projects:
- Client Services Portlet projects
- Client Services Web projects
- JSR168 Portlet projects targeting
- WebSphere Application Server 6.1
- Dynamic Web projects
The Add to Portlet JSP
function is only available when aggregating JSPs that are part of the above types of projects.
Parent topic: Developing Portlet application logic: XPD622