When trying to combine our components into a jar and turn it into a dependency in another project, I performed the following <>
This works for everything except the implementation of the composite component. The folder structure for our common project is shown below:
CommonWebProject |-- META-INF | |-- resources | | `-- common | | |-- css | | | ... | | |-- js | | | ... | | |-- components | | | `-- comment.xhtml | | |-- templates | | | `-- defaultTemplate.xhtml | |-- faces-config.xml | `-- MANIFEST.MF :
comment.xhtml consists of:
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui" xmlns:composite="http://java.sun.com/jsf/composite"> <composite:interface> </composite:interface> <composite:implementation> <p>TESTING!</p> </composite:implementation> </html>
The actual implementation is as follows:
<?xml version="1.0" encoding="UTF-8" ?> <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:csxc="http://java.sun.com/jsf/composite/csxcomponent" xmlns:p="http://primefaces.org/ui" xmlns:common="http://java.sun.com/jsf/composite/common" template="/common/templates/defaultTemplate.xhtml"> <ui:define name="head"> </ui:define> <common:comment/> </ui:composition>
Here the template "defaultTemplate.xhtml", which is extracted from the common jar, works correctly, but not the tag. When checking the page, only the tag is displayed.

Any ideas why?
source share