My Question is near the same than Packaging Facelets files (templates, includes, composites) in a JAR. Wich was full quallyfied awnsered by BalusC.
But I'll go a bit farther. Since JBoass AS 7 the ClassLoading in JB has changed. Now there is a strict Modul-ClassLoading and it works so far ;)
I have a WAR-file with an jboss-deployment-structure.xml plus one JAR-file with some CDI-Beans and xhtml-files in /META-INF/resources/modul. I deploy the two "projects" seperately (so the JAR is not packaged into the WAR both ar copyed in JBOSS_HOME/standalone/deployment).
The WAR references the JAR as a Modul through the jboss-deployment-structure.xml.
I'm able to Inject CDI-Beans from the JAR but I can't reach the xhtml-files in /META-INF/resources/modul/. Everytime I try to load CONTEXT_ROOT/modul/modul.xhtml I get a warning from JB :
[javax.enterprise.resource.webcontainer.jsf.application] (default task-5) JSF1064: Ressource /modul/modul.xhtml can not be found or served.
If I package the JAR into the WAR (WEB-INF/lib) it dosen't work ither.
I provided a faces-config.xml under META-INF/resources
Did I miss somethink?
reggards
I use WildFly 9.0.1 Final and the Provided J2EE implementations.