BEA Logo BEA WebLogic Commerce Server Release Beta

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

 

   WebLogic Commerce Server Doc Home   |   Personalization Tour   |   Previous Topic   |   Next Topic   |   Contents   |   Index

Editing the Example Portal

 

Now we are ready to pull the pieces together. In this chapter we will create a new portlet JSP page, add the new portlet to the example portal, and test the portal.

This topic includes the following sections:

 


Viewing the JSP Page

The JSP page displays content based on the defined rules and profile information.

To view the page, follow these steps:

  1. In a text editor, open tutorial.jsp, which is in <install-dir>\server\public_html\portals\repository\portlets.

  2. View the JSP code that you will add to the portlet later in this tour.

  3. Close tutorial.jsp when you finish viewing the page.

 


Building the Portlet

We have created the JSP page for the promotion. We now need to add a portlet that uses the tutorial.jsp into the portal.

  1. From the Administration Tools Home page, click the Portal Management icon. The Portal Management Home page appears.

  2. From the Portlets bar, click Create. The Create a New Portlet page appears.

  3. Type tutorial in the Portlet Name field and append tutorial.jsp to the existing content of portlets/ in the Content URL field.

  4. Click Create to create the new portlet. The page refreshes and confirms that the system created the portlet.

  5. Click Back to return to the Portal Management Home page.

 


Adding the Portlet to the Portal

  1. Click on the exampleportal link. The Example Portal Attributes view page appears.

  2. Notice that the tutorial portlet is displayed in the Associated Portlets table but it is grayed out, indicating that it is inactive. You must add the portlet to the example portal to activate it. Click (+/-) in the Associated Portlets bar to add the tutorial portlet to the example portal. The Add or Remove Portlets edit page appears.

  3. For the portlet named tutorial, click the radio button in the Visible column. This will make the portlet visible to example portal users.

  4. Click Save to save the changes. The page refreshes and displays a message about the operation's success.

  5. Click Back to return to the Example Portal view page. The page appears and the tutorial portlet name is displayed in the table with a check mark next to it. The check mark indicates that the portlet is visible to example portal users.

  6. Click Finished to save the example portal changes. The Portal Management home page appears.

  7. Close the Administration tool.

We have created the JSP page to match content to users based on the amount of AcmePoints they have. We also added a portlet to the example portal to display the content as a message. In the next chapter, we will deploy the portal and test it to see content personalization at work.