Create the Personalization user resource classes and content spot

 

+
Search Tips   |   Advanced Search

 

Ensure you have properly followed the steps in Create the Personalization content resource classes and content spot.

  1. In the Project Explorer tab in RAD, right click on the Pers_Offers project and choose New > Other

  2. From the New window, select Portal > Personalization > Content or User Resource.

  3. Click Next.

  4. Select the following options by clicking the appropriate radio button:

    1. SQL

    2. Connect to an SQL database for a database model

    3. Web users

  5. Enter the following values:

    1. In the Database field, type pzndemo_db

    2. From the Database vendor type drop-down list, select Cloudscape V5.1

    3. From the JDBC driver drop-down list, select Cloudscape Embedded JDBC Driver

    4. From the Database location field, click Browse. Navigate to and select portal_server_root /cloudscape/pzndemo_db/

    5. From the Class location field, click Browse. Navigate to and select portal_server_root /shared/app/cloudscape/db2j.jar

  6. Click Connect to Database. The personalization resource wizard opens.

  7. Expand APP > Tables

  8. On the Tables tab, highlight PZN_USER by single clicking on it. Click the arrow button pointing to the right to select the table.

  9. In the right column, right click on PZN_USER and select Edit Table.

  10. Change the Display Name of PZN_USER to Per_Offers_User to avoid naming conflicts with the previously installed demo code.

  11. Select the Columns tab

  12. On the Columns tab, move all columns to the right by clicking the double arrow button. Notice the primary key is the column USERNAME.

  13. Click the Mappings tab.

  14. On the Mappings tab, select Customertype and click Populate.

  15. Click the Select buttons and expand APP > Tables > APP.PZN_USER to select CUSTOMERTYPE:VARCHAR for the Description and Value fields. Click OK.

  16. Click the Deployment tab.

  17. On the Deployment tab, change the datasource to jdbc/pzndemo. This datasource is defined in WAS by the Personalization demo program installation. Click Next.

  18. Set the package name as pers_offers. Select Generate a Content Spot for this resource. Then click Finish.

We can now see the new java classes in the project:

We can now finish coding the portlet JSP file.