I have been trying to understand whether the spec allows slashes in
resource library names. For example, is it within the spec to have a
composite component with library name components/util?
It works fine in Mojarra: Place components into
resources/components/util and use a namespace alias
xmlns:util="http://java.sun.com/jsf/composite/components/util
But there is a catch--it won't locate a backing component in the
components.util package.
And per the API docs for Application#createComponent, I have no right to
expect that: "Create a fully qualified Java class name by removing any
file extension from resource-name and let fqcn be library-name + "." +
resource-name".
So, I tried to read the spec for clarification. 3.6.1.4 states: The
occurrence of the string “http://java.sun.com/jsf/composite/” in a
Facelet XML namespace declaration means that *whatever follows that last
“/”* is taken to be the name of a resource library.
"Whatever follows" is pretty clear. In my example, components/util would
be the library name. But is it a legal library name?
2.6.1.3 states "Every character in a resource identifier must be a valid
character suitable for use in a string passed to the constructor
of java.io.File that takes a single String argument."
I don't understand this statement. In Windows, can you make files
containing / symbols? If so, will slashes be treated as directory
separators? What about colons? Will they be drive letters?
Or are we saying it doesn't matter--we just feed the library name into
the File constructor, and whatever happens, happens? Then you could have
a situation where a WAR file works fine on Linux but not on Windows.
Before I file an issue, could one of you tell me whether you intended to
support hierarchical library names (such as components/util), or whether
you envisioned only one level?
Thanks,
Cay
--
Cay S. Horstmann |
http://horstmann.com | mailto:cay@horstmann.com