This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSF and the fly likes JSF Configuration File Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF Configuration File" Watch "JSF Configuration File" New topic

JSF Configuration File

Reema Patel
Ranch Hand

Joined: Jan 26, 2006
Posts: 169
The default config file in JSF is faces-config.xml. A JSF app can have mulitple JSF conf files that can be specified in the web.xml file, as shown here:

But, is it mandatory to have this definition in DD file?

John Blanco

Joined: Jan 13, 2005
Posts: 20

In fact, faces-config.xml is always included. You would only need to use this stanza to denote *other* files that have faces configuration.
Reema Patel
Ranch Hand

Joined: Jan 26, 2006
Posts: 169
Thanks John!

I think in most trivial apps faces-config.xml is used as the conf file. But, I see the DD element irrespective of any ither configuration file in almost all JSF Web Apps. I think it has become a common practive to include this element in the DD file.
It is sorta covered in the JavaRanch Style Guide.
subject: JSF Configuration File
Similar Threads
Ajaxifying the Existing JSF Components using ajax4jsf.
javax. servlet.jsp.J spException: Cannot find FacesContext
JSF beginner error: Cannot find FacesContext
Integration problems using h:selectOneMenu
JSF Facelets deployment problem