diff --git a/jetty-websocket/websocket-servlet/src/main/java/org/eclipse/jetty/websocket/servlet/WebSocketServletFactory.java b/jetty-websocket/websocket-servlet/src/main/java/org/eclipse/jetty/websocket/servlet/WebSocketServletFactory.java index 72c14782346..93d8377ef7b 100644 --- a/jetty-websocket/websocket-servlet/src/main/java/org/eclipse/jetty/websocket/servlet/WebSocketServletFactory.java +++ b/jetty-websocket/websocket-servlet/src/main/java/org/eclipse/jetty/websocket/servlet/WebSocketServletFactory.java @@ -44,7 +44,7 @@ public interface WebSocketServletFactory try { Class wsClazz = - (Class) Class.forName(DEFAULT_IMPL); + (Class) Class.forName(DEFAULT_IMPL,true,Thread.currentThread().getContextClassLoader()); Constructor ctor = wsClazz.getDeclaredConstructor(new Class[]{ServletContext.class, WebSocketPolicy.class}); return ctor.newInstance(ctx, policy); }