In this exercise, you will import the two bookmark sample portlets.
Before you can begin this tutorial, you must first import the required resources:
Import the two bookmark samples by following these steps:
Bookmarks (using IBMR portlet API)
sample. The sample introductory page opens in the right pane.
Bookmarks (using JSR 168 API)
.
Importing this sample also creates two projects, bookmarkJSREAR and bookmarkJSR.
The samples include the following files:
The workbench provides several types of portlet coding samples, which are available in the Samples Gallery. From the Help menu, select Samples Gallery > Technology samples > Portlet.
The samples provided under the Basic Portlet category are listed below. All of these samples illustrate differences between the two portlet APIs. To import any of the samples, open it and click on Import the sample on the main page of the sample.
The two bookmarks portlet samples illustrate a portlet that stores Web addresses as bookmarks.The Content Access portlet samples demonstrate use of the ContentAccessService interface provided by WebSphereR Portal.
The cooperative portlet samples show how to exchange information between portlets on the same page, using Click-To-Action (IBM portlet API) and the Property Broker Service (JSR 168 API) .
This tutorial discusses the bookmark portlet samples, explaining the differences between implementing the bookmark code using the IBM portlet API and the JSR 168 portlet API. Some differences that are not illustrated in the bookmark sample are also discussed.
The WebSphere Portal v5.0 test environment within the workbench automatically
supports the JSR 168 API.
If you are using a remote WebSphere Portal v5.0.2 server,
you must configure
WebSphere Portal to
allow JSR 168 portlets by editing the properties file
ConfigService.properties
in the
<WebSphere_Portal_install_root>/shared/app/config/services
directory, and setting
portal.enable.jsr168 = true.
The workbench provides support for the two APIs in the new Portlet project wizards:
When you create new portlets in these projects, they will be JSR 168 portlets or IBM portlets, depending on the project they are created in.
Now you are ready to begin Exercise 1.2: Conceptual differences between the APIs.