Skip to content

Commit

Permalink
Issue #12207 reinstate DefaultHandler for jetty maven plugin (#12211)
Browse files Browse the repository at this point in the history
  • Loading branch information
janbartel authored Sep 2, 2024
1 parent eecf4cf commit caa09ad
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@
import org.eclipse.jetty.maven.PluginLog;
import org.eclipse.jetty.security.LoginService;
import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.server.Handler;
import org.eclipse.jetty.server.RequestLog;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.handler.ContextHandler;
import org.eclipse.jetty.server.handler.ContextHandlerCollection;
import org.eclipse.jetty.server.handler.DefaultHandler;
import org.eclipse.jetty.util.resource.ResourceFactory;
import org.eclipse.jetty.xml.XmlConfiguration;

Expand Down Expand Up @@ -56,6 +58,9 @@ public static void configureHandlers(Server server, List<ContextHandler> context
if (requestLog != null)
server.setRequestLog(requestLog);

if (server.getDefaultHandler() == null)
server.setDefaultHandler(new DefaultHandler());

ContextHandlerCollection contexts = findContextHandlerCollection(server);
if (contexts == null)
{
Expand Down

0 comments on commit caa09ad

Please sign in to comment.