From e764a0f2e7e7d320a7b3dbd76e750a9353d2416a Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Thu, 5 Sep 2013 12:47:00 +1000 Subject: [PATCH] 416585 WebInfConfiguration examines webapp classloader first instead of its parent when looking for container jars --- .../java/org/eclipse/jetty/webapp/WebInfConfiguration.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebInfConfiguration.java b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebInfConfiguration.java index f2bd3803496..13613484795 100644 --- a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebInfConfiguration.java +++ b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebInfConfiguration.java @@ -87,7 +87,10 @@ public class WebInfConfiguration extends AbstractConfiguration context.getMetaData().addContainerJar(Resource.newResource(uri)); } }; - ClassLoader loader = context.getClassLoader(); + ClassLoader loader = null; + if (context.getClassLoader() != null) + loader = context.getClassLoader().getParent(); + while (loader != null && (loader instanceof URLClassLoader)) { URL[] urls = ((URLClassLoader)loader).getURLs();