diff --git a/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/ServletContextHandler.java b/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/ServletContextHandler.java index 3014288fb91e..c7f07432d536 100644 --- a/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/ServletContextHandler.java +++ b/jetty-ee10/jetty-ee10-servlet/src/main/java/org/eclipse/jetty/ee10/servlet/ServletContextHandler.java @@ -62,7 +62,6 @@ import jakarta.servlet.descriptor.TaglibDescriptor; import jakarta.servlet.http.HttpServlet; import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletResponse; import jakarta.servlet.http.HttpSessionActivationListener; import jakarta.servlet.http.HttpSessionAttributeListener; import jakarta.servlet.http.HttpSessionBindingListener; @@ -1191,13 +1190,9 @@ protected ContextResponse wrapResponse(ContextRequest request, Response response protected boolean handleByContextHandler(String pathInContext, ContextRequest request, Response response, Callback callback) { boolean initialDispatch = request instanceof ServletContextRequest; - if (initialDispatch && isProtectedTarget(pathInContext)) - { - Response.writeError(request, response, callback, HttpServletResponse.SC_NOT_FOUND, null); - return true; - } - - return false; + if (!initialDispatch) + return false; + return super.handleByContextHandler(pathInContext, request, response, callback); } @Override