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();