Datasheet
❑ Have a Web application deployment descriptor located at WEB-INF/web.xml
❑ Are packaged as Web archives (WAR files)
In addition to these features, the portlet application contains a portlet application deployment descrip-
tor, located at
WEB-INF/portlet.xml. This file is described in detail later in this chapter, in the section
“Portlet Application Deployment Descriptor.”
Security
Because security is a bigger matter than simply the requirements of the Portlet API, we defer the discus-
sion on security in the Portlet API to Chapter 6.
CSS Style Definitions
In order to achieve a common and pluggable look and feel for portlets, the Java Portlet API defines a set
of Cascading Stylesheets (CSS) styles that portlets should use in rendering their markup. By using a
standard set of styles, portals can support skins, customized colors and fonts. These styles are meant to
coincide with the OASIS Web Services for Remote Portlets standard.
In order to be complete, these style definitions are presented in the following table, as specified in
Appendix C of the JSR 168 (Java Portlet API).
Attribute Name Description
portlet-font This is for normal, unaccented text used in a portlet. Size can be
overridden using the
style attribute with something such as
“font-size:large”.
portlet-font-dim This is for suppressed text, essentially text that has been grayed out.
portlet-msg-status This is used to represent text that is providing the current state of
an operation in project, such as “Please wait while data loads...”
portlet-msg-info Use this for informational text such as “Reminder: your username
is your e-mail address.”
portlet-msg-error This styles messages such as “An unexpected error occurred,
please contact the administrator.”
portlet-msg-alert This is for warnings, such as “Could not get open database con-
nection, please try again in a couple of minutes.”
portlet-msg-success This relays messages when the submission was successful, such as
“Your request was submitted.”
portlet-section-header Use this to render the table or section header.
portlet-section-body This is to style the internals of a table cell.
portlet-section- When using a technique called banding, in which you provide
alternate alternate styles in between alternate rows, this style provides that
capability.
22
Chapter 1
04 469513 Ch01.qxd 1/16/04 11:04 AM Page 22