Creating the Personalization user resource classes and content spot
Use the Project Explorer of IBM Rational Application Developer to create the user resource classes and content spot for the Personalization demo that creates the Personalized Offers portlet for different customer profiles.
-
In the Project Explorer tab of Rational® Application Developer, right-click the Pers_Offers project and choose New > Other.
-
From the New window, select Portal > Personalization > Content or User Resource.
-
Click Next
-
Select one of the following radio buttons:
- SQL
- Web users
-
Select Use an existing connection and select pzndemo_db from the list of existing connections.
-
Click Next. The personalization resource wizard opens.
-
Expand PZNDEMO.
-
On the Tables tab, highlight PZN_USER. Click the appropriate arrow to select the table.
-
Right-click PZN_USER and select Edit Table.
-
Change the display name of PZN_USER to Per_Offers_User to avoid naming conflicts with the previously installed demo code. Click the Primary Table to mark it as the primary table.
-
Select the Columns tab
-
On the Columns tab, move all of the columns to the selected columns area by clicking the double arrow. Notice the primary key is the column USERNAME.
-
Click the Mappings tab.
-
On the Mappings tab, select Customertype and click Populate.
-
Click the Select buttons and expand PZNDEMO > PZN_USER 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 finish coding the portlet JSP file.