You can specify additional config files using this web.xml context-param. I don't know if it's required by the spec that /WEB-INF/faces-config.xml exist, or if throwing that exception is an implementation decision.
I generally define JSF behavior (enabling facelets or adffaces) in the /WEB-INF/faces-config.xml file, then define application-specific behavior in other config files, and I stick these other config files in a subdirectory.
Contrived example below:
<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>/WEB-INF/faces-config-global.xml,/WEB-INF/faces-config/faces-config-pages.xml</param-value>
<description>
Comma separated list of URIs of (additional) faces config files, excluding /WEB-INF/faces-config.xml
(e.g. /WEB-INF/my-config.xml)
See JSF 1.0 PRD2, 10.3.2
</description>
</context-param>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have several config files as well, including my renamed faces-config. When i start my application a "Faces config resource /WEB-INF/Faces-Config.xml not found" message and JSF isn't properly initialized... this behaviour only appeared since i used jsf-spring. If i use the default naming everythign works fine.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
i get an FileNotFound error if i rename my faces-config to something other than "faces-config.xml". Can i somehow use another naming?
Felix
You can specify additional config files using this web.xml context-param. I don't know if it's required by the spec that /WEB-INF/faces-config.xml exist, or if throwing that exception is an implementation decision.
I generally define JSF behavior (enabling facelets or adffaces) in the /WEB-INF/faces-config.xml file, then define application-specific behavior in other config files, and I stick these other config files in a subdirectory.
Contrived example below:
<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>/WEB-INF/faces-config-global.xml,/WEB-INF/faces-config/faces-config-pages.xml</param-value>
<description>
Comma separated list of URIs of (additional) faces config files, excluding /WEB-INF/faces-config.xml
(e.g. /WEB-INF/my-config.xml)
See JSF 1.0 PRD2, 10.3.2
</description>
</context-param>
I have several config files as well, including my renamed faces-config. When i start my application a "Faces config resource /WEB-INF/Faces-Config.xml not found" message and JSF isn't properly initialized... this behaviour only appeared since i used jsf-spring. If i use the default naming everythign works fine.
Ok, i removed the Faces-Config.xml from my javax.faces.CONFIG_FILES and renamed it to the standard naming... isn't worth any more effort ;) Thanks!
Actually, this should work, so if it doesn't it is a bug. It works in 4.0 which will be released in some days.
Cheers, Thomas