Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,7 @@
import org.eclipse.jetty.server.handler.RequestLogHandler;
import org.eclipse.jetty.server.handler.StatisticsHandler;
import org.eclipse.jetty.server.session.SessionHandler;
import org.eclipse.jetty.servlet.FilterHolder;
import org.eclipse.jetty.servlet.FilterMapping;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.servlet.ServletHandler;
import org.eclipse.jetty.servlet.ServletHolder;
import org.eclipse.jetty.servlet.ServletMapping;
import org.eclipse.jetty.servlet.*;
import org.eclipse.jetty.util.ArrayUtil;
import org.eclipse.jetty.util.MultiException;
import org.eclipse.jetty.util.ssl.SslContextFactory;
Expand Down Expand Up @@ -826,7 +821,7 @@ private static WebAppContext createWebAppContext(Builder b,
AccessControlList adminsAcl, final String appDir) {
WebAppContext ctx = new WebAppContext();
ctx.setDefaultsDescriptor(null);
ServletHolder holder = new ServletHolder(new WebServlet());
ServletHolder holder = new ServletHolder(new DefaultServlet());
Map<String, String> params = ImmutableMap. <String, String> builder()
.put("acceptRanges", "true")
.put("dirAllowed", "false")
Expand Down Expand Up @@ -948,7 +943,7 @@ protected void addDefaultApps(ContextHandlerCollection parent,
ServletContextHandler staticContext =
new ServletContextHandler(parent, "/static");
staticContext.setResourceBase(appDir + "/static");
staticContext.addServlet(WebServlet.class, "/*");
staticContext.addServlet(DefaultServlet.class, "/*");
staticContext.setDisplayName("static");
@SuppressWarnings("unchecked")
Map<String, String> params = staticContext.getInitParams();
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ public void testServletFilter() throws Exception {
for(int i = 0; i < urls.length; i++) {
assertTrue(RECORDS.remove(urls[i]));
}
assertTrue(RECORDS.size()==1);
// Accesing "/" will redirect to /index.html
assertTrue(RECORDS.contains("/index.html"));
assertTrue(RECORDS.isEmpty());
}
}