diff --git a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/bindings/GlobalWebappConfigBinding.java b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/bindings/GlobalWebappConfigBinding.java index 7b90177a46f..66e1c353a26 100644 --- a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/bindings/GlobalWebappConfigBinding.java +++ b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/bindings/GlobalWebappConfigBinding.java @@ -27,6 +27,7 @@ import org.eclipse.jetty.server.handler.ContextHandler; import org.eclipse.jetty.util.log.Log; import org.eclipse.jetty.util.log.Logger; import org.eclipse.jetty.util.resource.Resource; +import org.eclipse.jetty.webapp.WebAppClassLoader; import org.eclipse.jetty.webapp.WebAppContext; import org.eclipse.jetty.xml.XmlConfiguration; @@ -102,7 +103,7 @@ public class GlobalWebappConfigBinding implements AppLifeCycle.Binding jettyXmlConfig.getProperties().put("jetty.webapp",file.getCanonicalPath()); jettyXmlConfig.getProperties().put("jetty.webapps",file.getParentFile().getCanonicalPath()); - jettyXmlConfig.configure(context); + WebAppClassLoader.runWithServerClassAccess(()->{jettyXmlConfig.configure(context);return null;}); } else { diff --git a/jetty-deploy/src/test/resources/context-binding-test-1.xml b/jetty-deploy/src/test/resources/context-binding-test-1.xml index ae997ac5b79..14afc8f105f 100644 --- a/jetty-deploy/src/test/resources/context-binding-test-1.xml +++ b/jetty-deploy/src/test/resources/context-binding-test-1.xml @@ -1,7 +1,9 @@ - - org.eclipse.foo. + + + org.eclipse.foo. + `