+

Search Tips   |   Advanced Search

Develop a personalized portlet

This exercise demonstrates how to use Personalization features of WebSphere Portal and Rational Application Developer to build a personalized portlet. The portlet will use rules and content spots to display personal news based on user attributes (or profiles).

The demonstration Web site is organized into three pages:

  1. Front Page

    • Internal News displays internal YourCo news for the user. This portlet displays the news upon clicking upon one of the links.

    • General News displays external worldwide news articles for users. The portlet messages to the GeneralNewsDetails upon clicking upon one of the links.

    • UserInfo displays the current user's information, which is used in rules to target content throughout the website to the particular preferences of the users. This user information can be modified using the edit feature.

  2. Partners Page

    • The Products portlet displays products for the current user. The portlet messages to the PartnersDetails upon clicking upon one of the links.

    • Promotions runs a rule targeting the information in the portlet to the user's preferences.

    The promotions portlet also demonstrates running a campaign and the splitting of rules within a campaign. In this case, between March 1 and April 16, 2005 the Tax Season campaign will run. Within this campaign, one content spot is filled with 2 distinct rules, Get Tax Season Promotions and Get 3 Promotions about IRAs. Get Tax Season Promotions will be run 70% of the time and Get 3 Promotions about IRAs the remaining 30%.

    A second campaign is also running in the promotions spot between April 14 and April 15, 2005. This campaign has a higher priority than the Tax Season campaign so it will run at this time.

  3. Services Page

    • The Services portlet displays services offered to the user. Clicking on one of the services will display the details of the service. If logging is enabled, clicking on one of the services will log the fact that this particular type of service was selected by the user.

    • Offers displays current offers for the user. This portlet demonstrates calling an analysis bean from a rule.

Personalization can use database content. This exercise uses the sample database that comes with the Personalization sample.

    PZN_USER: contains user information, including profile attributes

    FIRST_NAME LAST_NAME DEPARTMENT CUSTOMERTYPE USERNAME*
    Scott Green Loans Gold scott
    Tawana Streble Human Resources Platinum tawana
    Marge Roorda Human Resources Platinum marge
    Andy McPherson IT Titanium andy

    PZN_OFFERS: contains text for special offers categorized by customer type

    OFFER_ID* CUSTOMERTYPE TITLE DETAILS
    1 Platinum 2nd House Mortgage Excellent Mortgage rates on the beach house.
    2 Gold Add other Cards Add other members of the household to your account.
    3 Platinum ARM Mortgage 1/3 5.9% APR Mortgage for 27 years.
    4 Titanium Free Checking Deluxe Free Checking with the attainment of a YourCo Financial Credit Card.

The common element in these tables is the column CUSTOMERTYPE. This column is important when you invoke Personalization later in the exercise.


Procedure

  1. Prerequisites for the Personalization portlet exercise
  2. Install the Personalization sample
  3. Create the JSP file in Rational Application Developer
  4. Create the Personalization content resource classes and content spot
  5. Create the Personalization user resource classes and content spot
  6. Coding the portlet JSP
  7. Export the WAR file and install the portlet
  8. Import Personalization Workspace resource collections
  9. Create a simple content rule
  10. Create a content spot
  11. Enhance the Personalized Portlet
  12. Insert dynamic table html/jsp code
  13. Modify resource collection properties
  14. Create the user profiler rule
  15. Create additional advanced rules
  16. Change content spot rule mapping
  17. Personalized List portlet
  18. Uninstall Personalization sample and database
  19. Personalization programming reference


Parent topic: Personalization

Previous topic: Feedback and analytics

Next topic: Prerequisites for the Personalization portlet exercise