I would like to place the Facelets template file for JSF in a JAR file.
I tried to reference it by EL as
<ui:composition template="#{resource['templates:template_pe_layout.xhtml']}">
which works perfect for CSS or images, but not for the composition template.
How could I achieve the goal?
The
#{resource}expression is initially designed for use inside CSS files only like soIt’s not intented for usage in
<h:outputStylesheet>,<h:outputScript>or<h:graphicImage>which should rather be used as follows:As to the templates, just specify the full
/META-INF/resourcesrelative path in there.See also: