Adding in-code comments about WebAppContext.getWebInf behavior
This commit is contained in:
parent
199a9cd2ad
commit
0023281e3f
|
@ -809,13 +809,15 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL
|
|||
if (getResourceBase() == null)
|
||||
return null;
|
||||
|
||||
// Iw there a WEB-INF directory?
|
||||
Resource webInf = getResourceBase().resolve("WEB-INF/"); // TODO: what does this do in a collection?
|
||||
// Is there a WEB-INF directory anywhere in the Resource Base?
|
||||
// ResourceBase could be a ResourceCollection
|
||||
// The result could be a ResourceCollection with multiple WEB-INF directories
|
||||
// Can return from WEB-INF/lib/foo.jar!/WEB-INF
|
||||
// Can also never return from a META-INF/versions/#/WEB-INF location
|
||||
Resource webInf = getResourceBase().resolve("WEB-INF/");
|
||||
if (!webInf.exists() || !webInf.isDirectory())
|
||||
return null;
|
||||
|
||||
// TODO: should never return from WEB-INF/lib/foo.jar!/WEB-INF
|
||||
// TODO: should also never return from a META-INF/versions/#/WEB-INF location
|
||||
return webInf;
|
||||
}
|
||||
|
||||
|
|
|
@ -811,7 +811,11 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL
|
|||
if (super.getBaseResource() == null)
|
||||
return null;
|
||||
|
||||
// Iw there a WEB-INF directory?
|
||||
// Is there a WEB-INF directory anywhere in the Resource Base?
|
||||
// ResourceBase could be a ResourceCollection
|
||||
// The result could be a ResourceCollection with multiple WEB-INF directories
|
||||
// Can return from WEB-INF/lib/foo.jar!/WEB-INF
|
||||
// Can also never return from a META-INF/versions/#/WEB-INF location
|
||||
Resource webInf = super.getBaseResource().resolve("WEB-INF/");
|
||||
if (!webInf.exists() || !webInf.isDirectory())
|
||||
return null;
|
||||
|
|
Loading…
Reference in New Issue