Skip to content

[ARQ-818] Expand WebArchiveClassLoader implementation to redirect all re... #7

Closed
wants to merge 1 commit into from

3 participants

@ALRubinger
An Innovative Testing Platform for the JVM member

...source requests to the web root.

@mkouba
mkouba commented Mar 16, 2012

I'd prefer to have some kind of fallback implemented as well - classloader should also try to find original resource name if the lookup of adjusted name fails.

@ALRubinger
An Innovative Testing Platform for the JVM member
@mkouba
mkouba commented Mar 16, 2012

Are you sure? What root do you have in mind? I don't see anything like this in servlet 3.0 and Java EE 6 spec.

By the way how about WEB-INF/lib lookup?
10.7.2 Web Application Class Loader: "The class loader that a container uses to load a servlet in a WAR must allow the developer to load any resources contained in library JARs within the WAR following normal Java SE semantics using getResource."

@ALRubinger
An Innovative Testing Platform for the JVM member
@ALRubinger
An Innovative Testing Platform for the JVM member

To get at your primary question regarding the 'fallback":

Let's invert this and ask another way: When should CL.getResource() requests relative to the root, and not "WEB-INF/classes", ever be allowed? We should be as strict as the spec allows.

@aslakknutsen
An Innovative Testing Platform for the JVM member

pushed upstream, 278e7d4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.