geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan <>
Subject How to support loading resources in META-INF/resources of jar files in WEB-INF/*.jar
Date Mon, 10 May 2010 13:55:59 GMT
    In Servlet 3.0, it is allowed to load the resource from
META-INF/resources of jar files in the WEB-INF folder while it is not found
in root folder. But now, in our BundleDirContext, there is not a direct way
(like getEntry) to read the resource.
    1. The simplest wayt is to wrap the url with zip stream, then iterator
it to find the resource. But it seems less efficient.
    2. Extract META-INF/resources from those jar files to the temp folders (
even one big folder) while starting the bundleDirContext. With this
solution, extra disk space is required
    3. Use classloader to load resource, with this, we may load some
unwanted resource ...
    Personally, I like the #2.  Any thoughts ?

View raw message