Datasheet

You grab a Map of the deployed user attributes by getting that attribute from the PortletRequest.
Then, you simply look up the appropriate value; in this case, the user’s work e-mail (stored under
“user.business-info.online.email”).
User attributes are very important in deploying personalized portlet solutions. Be sure to familiarize
yourself with these attributes.
Portlet Tag Library
The Portlet JSP Tag Library gives developers the capability to reference Portal components from within a
JSP page. The following table explains the tags:
Tag Name Purpose
defineObjects This tag declares three objects within the JSP page: RenderRequest ren-
derRequest
, RenderResponse renderResponse, and PortletConfig
portletConfig
.
actionURL This tag builds action URLs that point to the current portlet. This tag is
nested with
param tags in order to pass the appropriate parameters in the
action URL.
renderURL This tag builds render URLs. It also is nested with param tags.
namespace This tag provides a unique name based on the current portlet in order to
avoid conflicts in variable and function names when all of the portlet frag-
ments are consolidated into a portal page.
param This tag gives the name and value of a parameter. It is nested inside either
the
actionURL or renderURL tags.
Portlet Deployment
This section describes the portlet application deployment descriptor (portlet.xml), by dissecting a
sample and explaining the various sections of the descriptor piece by piece.
Portlet Application Deployment Descriptor
In order to understand the portlet application deployment descriptor well, you should examine each part.
If you have used XML very much, you will find this first section unremarkable. The only thing worth
noting here is that the
version attribute is required to determine which version of the specification is in
effect.
<?xml version=”1.0” encoding=”UTF-8”?>
<portlet-app xmlns=”http://java.sun.com/xml/ns/portlet”
version=”1.0” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
xsi:noNamespaceSchemaLocation=”http://java.sun.com/xml/ns/portlet-app_1_0.xsd”>
28
Chapter 1
04 469513 Ch01.qxd 1/16/04 11:04 AM Page 28