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, right click the Pers_Offers project and choose New > Other.
  2. From the New window, select Portal > Personalization > Content or User Resource.
    Refer to this step for details on the task to perform on the Select a wizard panel.
  3. Click Next
  4. Select the following options by clicking the appropriate radio button:
    1. SQL
    2. Web users
    Refer to this step for details on the task to perform on the Specify Protocol and Data Model panel.
  5. Select Use an existing connection and select pzndemo_db from the list of existing connections.
    Select the existing connection to the Personalization demo database
  6. Click Next. The personalization resource wizard opens.
  7. Expand PZNDEMO.
  8. On the Tables tab, highlight PZN_USER by single clicking on it. Click the appropriate arrow button to select the table.
    Refer to this step for details on the task to perform on the Construct a Personalization Resource panel Tables tab.
  9. 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. Click the Primary Table button to mark it as the primary table.
    Refer to this step for details on the task to perform on the Construct a Personalization Resource panel (Tables tab).
  11. Select the Columns tab
  12. 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.
    Refer to this step for details on the task to perform on the Construct a Personalization Resource panel Columns tab.
  13. Click the Mappings tab.
  14. On the Mappings tab, select Customertype and click Populate.
    Refer to this step for details on the task to perform on the Construct a Personalization Resource panel Mappings tab
  15. Click the Select buttons and expand PZNDEMO > PZN_USER to select CUSTOMERTYPE for the Description and Value fields. Click OK.
    Refer to this step for details on the task to perform on the Populate window.
  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.
    Refer to this step for details on the task to perform on the Construct a Personalization Resource panel Deployment tab.
  18. Click Next.
  19. 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.
    Refer to this step for details on the task to perform on the Package name and source folder panel.
  20. Click Finish.
You can now see the new JAVA classes in your project:
Refer to this step for details on the task to perform on the Project Explorer tab.
You can now finish coding the portlet JSP file.