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:
- In a text editor, open tutorial.jsp, which is in
<install-dir>\server\public_html\portals\repository\portlets.
- View the JSP code that you will add to the portlet later in this tour.
- 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.
- From the Administration Tools Home page, click the Portal Management icon. The
Portal Management Home page appears.
- From the Portlets bar, click Create. The Create a New Portlet page appears.
- Type tutorial in the Portlet Name field and append tutorial.jsp to the
existing content of portlets/ in the Content URL field.
- Click Create to create the new portlet. The page refreshes and confirms that the
system created the portlet.
- Click Back to return to the Portal Management Home page.
Adding the Portlet to the Portal
- Click on the exampleportal link. The Example Portal Attributes view page appears.
- 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.
- For the portlet named tutorial, click the radio button in the Visible column. This
will make the portlet visible to example portal users.
- Click Save to save the changes. The page refreshes and displays a message about
the operation's success.
- 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.
- Click Finished to save the example portal changes. The Portal Management home
page appears.
- 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.
|
Copyright © 2000 BEA Systems, Inc. All rights reserved.
Required browser: Netscape 4.0 or higher, or Microsoft Internet Explorer 4.0 or higher.
|