JSF merges the definitions found in multiple faces-config.xml files. When a JSF application starts, the implementation looks for faces-config.xml files in this order:
All JAR file resources in the web application’s
ServletContext resource paths (in the reverse
order of which they are returned by the
) method) are scanned for files named
A comma-separated list of context-relative paths defined by the
javax.faces.CONFIG_FILES context parameter in the
The WEB-INF/faces-config.xml file.
This algorithm allows developers of custom classes to bundle them in JAR files with their declarations, making installation as easy as dropping the JAR file into the WEB-INF/lib directory. Because the WEB-INF/faces-config.xml file is considered last, you can override all configuration setting for a specific application in this file. Factory classes can be declared in additional files. See Appendix D for details.