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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

14<br />

CHAPTER 14<br />

Configuring <strong>Java</strong>Server Faces Applications<br />

<strong>The</strong> responsibilities of the application architect include the following:<br />

■ Registering back-end objects with the application so that all parts of the application have<br />

access to them<br />

■ Configuring backing beans and model beans so that they are instantiated with the proper<br />

values when a page makes reference to them<br />

■ Defining navigation rules for each of the pages in the application so that the application has<br />

a smooth page flow<br />

■ Packaging the application to include all the pages, objects, and other files so that the<br />

application can be deployed on any compliant container<br />

This chapter explains how to perform all the responsibilities of the application architect.<br />

Application Configuration Resource File<br />

<strong>Java</strong>Server Faces technology provides a portable configuration format (as an XML document)<br />

for configuring resources. An application architect creates one or more files, called application<br />

configuration resource files, that use this format to register and configure objects and to define<br />

navigation rules. An application configuration resource file is usually called faces-config.xml.<br />

<strong>The</strong> application configuration resource file must be valid against the schema located at<br />

http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd.<br />

In addition, each file must include the following, in this order:<br />

■ <strong>The</strong> XML version number:<br />

<br />

■ A faces-config tag enclosing all the other declarations:<br />

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

Saved successfully!

Ooh no, something went wrong!