I created a custom template file in META-INF/resources/templates/master.xhtml and packed it in a jar (templates.jar). When i try to reference this template in a page, i.e. <ui:composition template="/templates/master.xhtml"> everything works fine as long as the templates.jar resides within WEB-INF/lib.
Unfortunately, when i try to reference templates.jar as Jboss module via the jboss-deployment-structure.xml something goes wrong, and i find the following error in the logs:
13:22:09,730 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/p_lag-account-web].[Faces Servlet]] (http--10.250.17.16-8280-2) Servlet.service() for servlet Faces Servlet threw exception: javax.faces.view.facelets.TagAttributeException: /index.xhtml @8,52 <ui:composition template="/templates/master.xhtml"> Invalid path : /templates/master.xhtml
at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:160) [jsf-impl-2.1.7-jbossorg-2.jar:]
at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93) [jsf-impl-2.1.7-jbossorg-2.jar:]
at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:86) [jsf-impl-2.1.7-jbossorg-2.jar:]
so my question is: is it possible, to put template files in a jboss module and, if yes, how can i achieve this?
Because i want to use the templates.jar in several projects, it would be finde to have it distributed via a central location.
Kind regards,
Uwe