2011/6/10 Rajiv Mordani <rajiv.mordani_at_oracle.com>:
>> My particular use case is to support plugin based architectures on the
>> Servlet/JSP platform. For these kinds of applications, it it desirable
>> to distribute apps and plugins independently. It is inconvenient
>> having to reassemble the application war file just to add or upgrade a
>> plugin. I should be possible to add it by dropping it in a folder.
>
> So are you suggesting that we define a standard location for such a folder
> and the
> mechanism to associate an application with a particular folder?
Looking at the API Eirik has suggested, I don't think he is suggesting
a fixed path.
Rather pluggable modules that can provide resources from arbitrary
locations (eg a directory, a remote server, from the classpath,
generated from something else etc.).
>> -----------------------------------------------
>> - New interface ResourceLoader:
>>
>> package javax.servlet.ResourceLoader;
>>
>> interface ResourceLoader {
>> URL getResource(String path);
>> Set getResourcePaths(String path);
>> InputStream getResourceAsStream(String path);
>> }
>
> Would the "path" above would be a URI or an absolute file system path?
> The path would point to a jar file?
I think that path is the same path that is passed into the current
ServletContext.getResource(path) method.
I remember last time around we were talking about being able to wrap
the ServletContext instance so that the getResource methods could be
overridden. Perhaps this is a simpler alternative to that.
cheers