Previous Section  < Day Day Up >  Next Section

Appendix E. JSF Configuration File Reference

One or more configuration files are used to configure a JSF application. The main configuration file for an application is the WEB-INF/faces-config.xml file. Files in the same format can be bundled also within JAR files containing custom components, renderers, or any other custom JSF classes. See Chapter 13 and the description of the FactoryFinder class in Appendix D for details.

This appendix describes all elements that can be used in a JSF configuration file. The configuration file is an XML file, with the rules for which elements it can contain and how they must be arranged controlled by Document Type Definition (DTD) available online at This DTD must be referenced in the document type declaration at the top of the configuration file, as shown in Example E-1.

Example E-1. JSF DTD element
<!DOCTYPE faces-config PUBLIC

  "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"





All other elements in the configuration file must be enclosed within a <faces-config> element as shown in Example E-1.

Within the <faces-config> element body, top-level elements can be included in any order. Each top-level element is described in a separate section in this appendix. The top-level elements are all optional and can be included more than once, unless otherwise stated. Most top-level elements contain other elements.

I use syntax descriptions similar to those in the other appendixes to show the rules for the elements nested within top-level elements. The nested elements must be included in the order they are listed in the syntax description. Mutually exclusive elements are separated by vertical bars (|). Optional nested elements are embedded in square brackets ([]), followed by an asterisk (*) if more than one element of this type may be used. An element name followed by a plus sign (+) means the element is required, but it can be used more than once. For elements that accept predefined values, all values are listed separated by vertical bars; the default value (if any) is in bold font. Italics are used for element values that don't have a fixed set of accepted values. Element attribute values are described using the same syntax as element values.

    Previous Section  < Day Day Up >  Next Section