Hi,

I want to distribute my web resources (.xhtml files) in several different
jars.

For example,

    a.jar!/resources/a/foo.xhtml
    b.jar!/resources/b/bar.xhtml

After check into the source code, I found it's impossible. (Well, I have
patched on myfaces-impl 2.0.4 personally, and it works for myself now)

One problem is, myfaces cached the root resource url at the very beginning,
and then skipped ResourceResolve at all. (Well, sounds like resolveUrl()
should be renamed to getRootUrl(), :D)

So, you can't cache a single root resource (`a.jar!/resources/` or
`b.jar!/resources/`), because there are different roots.

So I want my ResourceResolver.resolveUrl(path) be called each time a
resource is requested.

Also I'd like to mention that, myfaces-impl try to guess something for
viewId using ServletContext.getResource(path). That's weired, because there
is already ResourceResolver.

So, I have to patch the servlet context, too, to make my
OverlappedResourceResolver be useful. For this reason, I've patched on Jetty
and Tomcat, but I think it should be done in myfaces, to use
ResourceResolver on the fly whenever possible.


Thanks,
Lenik

Reply via email to