Skip to content

Commit 2a038ae

Browse files
committed
Fix up the JettyAppServer
After the Jetty update is was only serving from the StaticResourceHandler, and none of the other servlets.
1 parent dd1c17e commit 2a038ae

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

java/client/test/org/openqa/selenium/environment/webserver/JettyAppServer.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import org.seleniumhq.jetty9.server.handler.AllowSymLinkAliasChecker;
3737
import org.seleniumhq.jetty9.server.handler.ContextHandler.ApproveAliases;
3838
import org.seleniumhq.jetty9.server.handler.ContextHandlerCollection;
39+
import org.seleniumhq.jetty9.server.handler.HandlerList;
3940
import org.seleniumhq.jetty9.server.handler.ResourceHandler;
4041
import org.seleniumhq.jetty9.servlet.ServletContextHandler;
4142
import org.seleniumhq.jetty9.servlet.ServletHolder;
@@ -267,9 +268,13 @@ protected ServletContextHandler addResourceHandler(String contextPath, Path reso
267268
staticResource.setMimeTypes(mimeTypes);
268269

269270
context.setContextPath(contextPath);
270-
context.setHandler(staticResource);
271271
context.setAliasChecks(ImmutableList.of(new ApproveAliases(), new AllowSymLinkAliasChecker()));
272272

273+
HandlerList allHandlers = new HandlerList();
274+
allHandlers.addHandler(staticResource);
275+
allHandlers.addHandler(context.getHandler());
276+
context.setHandler(allHandlers);
277+
273278
handlers.addHandler(context);
274279

275280
return context;

0 commit comments

Comments
 (0)