Java Reference
In-Depth Information
component-type
element in the configuration for
AreaComponent
defines a value
of
DemoArea
, which matches the value returned by the
AreaTag
class's
getCompon-
entType
method.
The
component-class
element indicates the fully qualified class name of the com-
ponent. The
property
elements specify the component properties and their types.
If the custom component can include facets, you can configure the facets in the component
configuration using
facet
elements, which are allowed after the
component-class
elements. See
“
Registering a Custom Renderer with a Render Kit
” on page
165
for further
details on configuring facets.
Basic Requirements of a JavaServer Faces Application
In addition to configuring your application, you must satisfy other requirements of
JavaServer Faces applications, including properly packaging all the necessary files and
providing a deployment descriptor. This section describes how to perform these adminis-
trative tasks.
JavaServer Faces applications can be packaged in a WAR file, which must conform to
specific requirements to execute across different containers. At a minimum, a WAR file
for a JavaServer Faces application must contain the following:
• A web application deployment descriptor, called
web.xml
, to configure resources
required by a web application
• A specific set of JAR files containing essential classes
• A set of application classes, JavaServer Faces pages, and other required resources,
such as image files
A WAR file may also contain:
• An application configuration resource file, which configures application resources
• A set of tag library descriptor files
For example, a Java Server Faces web application WAR file using Facelets typically has
the following directory structure:
$PROJECT_DIR
[Web Pages]
+- /[xhtml documents]
+- /resources
+- /WEB-INF
+- /classes
+- /lib
+- /web.xml