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.

3. Add a param-value element to the context-param element and give it the value true. <strong>The</strong><br />

default value is false.<br />

Normally, this flag should be set to false during development because it takes extra time to<br />

check the objects.<br />

Including the Required JAR Files<br />

<strong>Java</strong>Server Faces applications require several JAR files to run properly. <strong>The</strong>se JAR files are as<br />

follows:<br />

■ jsf-api.jar (contains the javax.faces.* API classes)<br />

■ jsf-impl.jar (contains the implementation classes of the <strong>Java</strong>Server Faces<br />

implementation)<br />

■ jstl.jar (required to use JSTL tags and referenced by <strong>Java</strong>Server Faces implementation<br />

classes)<br />

■ standard.jar (required to use JSTL tags and referenced by <strong>Java</strong>Server Faces reference<br />

implementation classes)<br />

■ commons-beanutils.jar (utilities for defining and accessing <strong>Java</strong>Beans component<br />

properties)<br />

■ commons-digester.jar (for processing XML documents)<br />

■ commons-collections.jar (extensions of the <strong>Java</strong> 2 SDK Collections Framework)<br />

■ commons-logging.jar (a general-purpose, flexible logging facility to allow developers to<br />

instrument their code with logging statements)<br />

<strong>The</strong> jsf-api.jar and the jsf-impl.jar files are located in as-install/lib. <strong>The</strong> jstl.jar file is<br />

bundled in appserv-jstl.jar. <strong>The</strong> other JAR files are bundled in the appserv-rt.jar, also<br />

located in as-install/lib/.<br />

When packaging and deploying your <strong>Java</strong>Server Faces application, you do not need to explicitly<br />

package any of the JAR files.<br />

Including the Classes, Pages, and Other Resources<br />

When packaging web applications using the included build scripts, you’ll notice that the scripts<br />

package resources as described here:<br />

■ All JSP pages are placed at the top level of the WAR file.<br />

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

■ <strong>The</strong> TLD files, the faces-config.xml file, and the web.xml file are packaged in the WEB-INF<br />

directory.<br />

■ All packages are stored in the WEB-INF/classes/ directory.<br />

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

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

Saved successfully!

Ooh no, something went wrong!