10.12.2012 Views

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<br />

shape<br />

java.lang.String<br />

<br />

<br />

<strong>The</strong> component-type element indicates the name under which the component should be<br />

registered. Other objects referring to this component use this name. For example, the<br />

component-type element in the configuration for AreaComponent defines a value of DemoArea,<br />

which matches the value returned by the AreaTag class’s getComponentType method.<br />

<strong>The</strong> component-class element indicates the fully qualified class name of the component. <strong>The</strong><br />

property elements specify the component properties and their types.<br />

If the custom component can include facets, you can configure the facets in the component<br />

configuration using facet elements, which are allowed after the component-class elements.<br />

See “Registering a Custom Renderer with a Render Kit” on page 452 for further details on<br />

configuring facets.<br />

Basic Requirements of a <strong>Java</strong>Server Faces Application<br />

In addition to configuring your application, you must satisfy other requirements of <strong>Java</strong>Server<br />

Faces applications, including properly packaging all the necessary files and providing a<br />

deployment descriptor. This section describes how to perform these administrative tasks.<br />

<strong>Java</strong>Server Faces applications must be compliant with the Servlet specification, version 2.3 (or<br />

later) and the <strong>Java</strong>Server Pages specification, version 1.2 (or later). All applications compliant<br />

with these specifications are packaged in a WAR file, which must conform to specific<br />

requirements in order to execute across different containers. At a minimum, a WAR file for a<br />

<strong>Java</strong>Server Faces application must contain the following:<br />

■ A web application deployment descriptor, called web.xml, to configure resources required<br />

by a web application<br />

■ A specific set of JAR files containing essential classes<br />

■ A set of application classes, <strong>Java</strong>Server Faces pages, and other required resources, such as<br />

image files<br />

■ An application configuration resource file, which configures application resources<br />

<strong>The</strong> WAR file typically has this directory structure:<br />

index.html<br />

JSP pages<br />

WEB-INF/<br />

web.xml<br />

Basic Requirements of a <strong>Java</strong>Server Faces Application<br />

Chapter 14 • Configuring <strong>Java</strong>Server Faces Applications 455

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!