In addition to importing the sample application, by clicking on the Import the sample link, you must also perform one of the following sets of configuration steps to enable the sample to run and display cooperative behavior in the WebSphere Portal v5.1 Test Environment:
Note: The first set of steps describe how to add wires for portlet communication to the existing portlet project. Although this method is slightly simpler, the wires that you create must be reset each time you restart the test environment. For your own applications, it may be advisable to associate wires with the portal project that you create for your portlets, as described in the second set of steps, because the wires will persist each time that you run or publish the portal project.
To add wires and run the cooperativeJSR portlet project on the WebSphere Portal v5.1 Test Environment, follow these steps:
- Create and configure the server:
- Display the Servers view. It is located near the Properties and Quick Edit views.
- Select New > Server from the view's pop-up menu.
- Select WebSphere Portal v5.1 Test Environment from the server type list.
- Click Next two times. You will be in the Add and Remove Projects page.
- Add the cooperativeJSREAR project to the Configured projects list, and click Finish.
- Double-click WebSphere Portal v5.1 Test Environment in the Servers view to open the server configuration file.
- Select the Portal tab in the server editor.
- Select the Enable base portlets for portal administration and customization check box.
- Save the server configuration file.
Run the portlet project on the server. Select the project, and choose Run > Run on Server from its pop-up menu.
Add wires on the WebSphere Portal Test Environment:
- Click Edit Pages.
- Select Wires and add up to six wires. See the WebSphere Portal product documentation for detailed information about using wires for cooperative behavior. Click Done.
The sample portlets will be enabled for cooperation. However, if you restart the WebSphere Portal v5.1 Test Environment, you must add the wires again to enable cooperation.
To add wires to a portal project and run the portal project on the WebSphere Portal v5.1 Test Environment, follow these steps:
- Create a new portal project:
- Select File > New > Portal Project from the menu.
- Provide a name for the portal project, and select 5.1.0.0 from the Select the portal server version drop-down list.
- Click Finish. The Portal Configuration opens in Portal Designer.
- Insert the cooperativeJSR portlets on the portal project:
- From the Project Explorer view, expand cooperativeJSR > Portlet Deployment Descriptor.
- Drag and drop the five portlets under Portlet Deployment Descriptor to the Portal Configuration file.
- Add wires to the portal project:
- In the Portal Configuration file, select Page1.
- In the Properties view, select the Wires tab.
- Click Add to add a wire. Repeat these steps until you have added six wires.
- Save and close the file.
- Run the portal project on the server:
- In the Project Explorer view, select the MyPortal portal project, and select Run > Run on Server.
- Select WebSphere Portal v5.1 Test Environment as the server type, and click Finish.
- The sample portlets will be enabled for cooperation.
|