I have created a composite component in JSF2. I works great.
I would like to create it as JAR for future use.
I followed the instructions here.
However, when it comes to CSS the browser refers to the location relatively to the project that uses the jar and not to the Jar location!
I defined it like this:
<h:outputStylesheet library="css" name="component.css" target="head" />
and I get this exception: GET http://localhost:8080/MY_APPLICATION/resources/component.css 404 (Not Found)
It's looking for it relatively to the projects, and not to the Jar project!
How can I make it relative to the JAR project?
EDITED
The JAR tree is:
META-INF
--resource
-- components
myComp.xhtml
components.css
-- img
-- scripts
--components.taglib.xml
--faces.config.xml
The war is a regular dynamic project:
WEB-INF
--lib
myJar.jar
-- web.xml
-- faces-config.xml
testComp.xhtml