JSF spec 2.2 (2013-03-20) says in item 10.3.3.1 (Declaring a composite component library for use in a Facelet page):
If a facelet taglibrary is declared in an XHTML page with a namespace starting with the string “http://java.sun.com/jsf/composite/” (without the quotes), the remainder of the namespace declaration is taken as the name of a resource library [...]
If the substring following “http://java.sun.com/jsf/composite/” contains a “/” character, or any characters not legal for a library name the following action must be taken. If application.getProjectStage() is Development an informative error message must be placed in the page and also logged. Otherwise the message must be logged only.
So that means it's illegal to have the following folder structure:
resources
components
system
something_specific
something_even_more_specific
and refer to the library name “http://java.sun.com/jsf/composite/components/something_specific”? Is this correct?
That seems like a weird restriction. I want my sources structured, not mushed together in an enormous lump.
Such hierarchical library actually works in Wildfly 8.0.0.CR1, but I'm not sure if it's wise to rely on this behavior.
A "best practices" kind of answers are welcome.
javax.faces.application.ResourceHandler.createResource(String)
javadoc:For historical reasons, this method operate correctly when the argument resourceName is of the form libraryName/resourceName, even when resourceName contains '/' characters.
– Vsevolod Golovanov