+

Search Tips   |   Advanced Search

Create 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.

  1. In the Project Explorer tab of Rational Application Developer select...

      Pers_Offers project (right-click) | New | Other | Portal | Personalization | Content or User Resource | Next

  2. Select one of the following radio buttons:

    • SQL
    • Web users

  3. From the list of existing connections, select...

      Use an existing connection and select pzndemo_db

  4. Click Next. The personalization resource wizard opens.

  5. Expand PZNDEMO.

  6. On the Tables tab, highlight PZN_USER.

    Click the appropriate arrow button to select the table.

  7. Right-click PZN_USER and select Edit Table.

  8. 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 button to mark it as the primary table.

  9. Select the Columns tab

  10. On the Columns tab, move all of the columns to the selected columns area by clicking the double arrow button. Notice the primary key is the column USERNAME.

  11. Click the Mappings tab.

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

  13. Click the Select buttons and expand...

      PZNDEMO > PZN_USER

    ...to select CUSTOMERTYPE for the Description and Value fields. Click OK.

  14. Click the Deployment tab.

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

  16. Click Next.

  17. 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.

  18. Click Finish.


Results

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


What to do next

We can now finish coding the portlet JSP file.


Parent topic: Develop a personalized portlet

Previous topic: Create the Personalization content resource classes and content spot

Next topic: Coding the portlet JSP