Datasheet

As you can see, the servlet container is the basis for any portal, upon which the portlet container exten-
sion is built. Likewise, a portal is built on top of that portlet container, which manages the portlets
required to handle client requests.
Before describing the relationships between portlets and servlets, we should discuss a few of the funda-
mental definitions related to the Portlet API.
The following table provides a list of the definitions that are used in this chapter to explain the Portlet
API. Of course, many others will be introduced throughout the chapter, but these are the fundamental
ones required for an understanding of the chapter.
Term Definition
Portal A Web-based application server that aggregates, customizes, and personalizes
content to give a presentation layer to enterprise information systems.
Portlet A pluggable Web component managed by a portlet container; it provides
dynamic content as part of an aggregated user interface.
Fragment The result of executing a portlet, a “chunk” of markup (HTML, XML, and so
on) that adheres to certain rules (see the sidebar “Rules for Fragments”).
Portlet Container The runtime environment of a portlet. It manages the life cycle of portlets, and
handles requests from the portal by invoking portlets inside the container.
Although this is not an all-encompassing list, it provides the basic terms that are used repeatedly in this
chapter.
Portlets and Servlets
As mentioned before, the Portlet API is an extension to the Servlet API. Therefore, there are both similar-
ities and differences between the components. It is important to understand these distinctions in order to
understand why there is a portlet specification (and break habits wrought from using their similar
servlet sisters).
The similarities between portlets and servlets are as follows:
Portlets and servlets are both Java 2 Enterprise Edition (J2EE) Web components.
Both are managed by containers, which control their interactions and life cycle.
Each generates dynamic Web content via a request/response paradigm.
Fragments are not allowed to use certain tags from their respective markup lan-
guages. These tags include html, title, head, body, base, frameset, frame, link, meta,
and style. Use of these tags will invalidate the entire fragment. This is particularly
important to developers (like us!) who have been abusing the forgiving nature of
browsers until now.
5
The Java Portlet API (JSR 168)
04 469513 Ch01.qxd 1/16/04 11:04 AM Page 5