Create the Personalization content resource classes and content spot
- In the Project Explorer tab in RAD, right click on the Pers_Offers project and choose...
New | Other | Portal | Personalization | Content or User Resource
- Click Next.
- Select the following options by clicking the appropriate radio button:
- SQL
- Web Content
- Select Create a new connection and click Next.
- Enter the following values:
- From the JDBC driver drop-down list, select Derby Embedded JDBC Driver.
- From the Database location field, click Browse.
Select...
WP_PROFILE/PortalServer/derby/pzndemo_db/- From the Class location field, click Browse. Navigate to...
and select AppServer_root/derby/lib/derby.jar
- Click Next. The personalization resource wizard opens.
If the "Available Tables" section is empty on the Pesonalization Resource page, you might need to migrate your pzndemo_db from Derby to DB2. One way to do this is to download and install IBM DB2 Developer Workbench, and then use the migrate wizard.
- Expand PZNDEMO.
- On the Tables tab, highlight PZN_OFFERS by single clicking on it. Click the arrow button pointing to the right to select the table. Click Primary Table to mark it as the primary table.
- Select the Columns tab.
- On the Columns tab, move all columns to the right by clicking the double arrow button. Notice the primary key is the column Offer_ID.
- Click the Mappings tab.
- On the Mappings tab, select Customertype and click Populate.
- Click the Select buttons and expand PZNDEMO > PZN_OFFERS to select CUSTOMERTYPE for the Description and Value fields. Click OK.
- Click the Deployment tab.
- On the Deployment tab, change the datasource to jdbc/pzndemo. This datasource is defined in WAS by the Personalization demo program installation.
- Click Next.
- Set the package name as pers_offers. Select Generate a Content Spot for this resource. Select Include schema names in the generated Resource Runtime Manager.
- Click Finish.
You can now see the new JAVA classes in your project:
You can now see the new JAVA classes in your project, and create the Personalization user resource classes and content spot.
Parent topic
Developing a personalized portlet
Previous topic:
Create the JSP file in Rational Application DeveloperNext topic:
Create the Personalization user resource classes and content spot