diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/Response.java b/jetty-server/src/main/java/org/eclipse/jetty/server/Response.java index 2ab4e6c9f09..272955324c0 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/Response.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/Response.java @@ -26,7 +26,6 @@ import java.util.Collections; import java.util.Enumeration; import java.util.Locale; -import javax.servlet.RequestDispatcher; import javax.servlet.ServletOutputStream; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletResponse; @@ -342,10 +341,10 @@ public class Response implements HttpServletResponse error_handler = _connection.getConnector().getServer().getBean(ErrorHandler.class); if (error_handler!=null) { - request.setAttribute(RequestDispatcher.ERROR_STATUS_CODE,new Integer(code)); - request.setAttribute(RequestDispatcher.ERROR_MESSAGE, message); - request.setAttribute(RequestDispatcher.ERROR_REQUEST_URI, request.getRequestURI()); - request.setAttribute(RequestDispatcher.ERROR_SERVLET_NAME,request.getServletName()); + request.setAttribute(Dispatcher.ERROR_STATUS_CODE,new Integer(code)); + request.setAttribute(Dispatcher.ERROR_MESSAGE, message); + request.setAttribute(Dispatcher.ERROR_REQUEST_URI, request.getRequestURI()); + request.setAttribute(Dispatcher.ERROR_SERVLET_NAME,request.getServletName()); error_handler.handle(null,_connection.getRequest(),_connection.getRequest(),this ); } else diff --git a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHandler.java b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHandler.java index 05d0ce25ee8..14e5fe054ca 100644 --- a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHandler.java +++ b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHandler.java @@ -24,19 +24,20 @@ import java.util.Arrays; import java.util.Collections; import java.util.EnumSet; import java.util.HashMap; -import java.util.List; +import java.util.HashSet; import java.util.ListIterator; +import java.util.Set; +import java.util.List; import java.util.Map; import java.util.Queue; -import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.ConcurrentMap; +import javax.servlet.AsyncContext; import javax.servlet.DispatcherType; import javax.servlet.Filter; import javax.servlet.FilterChain; -import javax.servlet.RequestDispatcher; import javax.servlet.Servlet; import javax.servlet.ServletContext; import javax.servlet.ServletException; @@ -57,6 +58,7 @@ import org.eclipse.jetty.security.IdentityService; import org.eclipse.jetty.security.SecurityHandler; import org.eclipse.jetty.server.AbstractHttpConnection; import org.eclipse.jetty.server.Dispatcher; +import org.eclipse.jetty.server.AbstractHttpConnection; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.ServletRequestHttpWrapper; @@ -391,8 +393,8 @@ public class ServletHandler extends ScopedHandler if (DispatcherType.INCLUDE.equals(type)) { - baseRequest.setAttribute(RequestDispatcher.INCLUDE_SERVLET_PATH,servlet_path); - baseRequest.setAttribute(RequestDispatcher.INCLUDE_PATH_INFO, path_info); + baseRequest.setAttribute(Dispatcher.INCLUDE_SERVLET_PATH,servlet_path); + baseRequest.setAttribute(Dispatcher.INCLUDE_PATH_INFO, path_info); } else { @@ -560,8 +562,8 @@ public class ServletHandler extends ScopedHandler if (!response.isCommitted()) { - request.setAttribute(RequestDispatcher.ERROR_EXCEPTION_TYPE,th.getClass()); - request.setAttribute(RequestDispatcher.ERROR_EXCEPTION,th); + request.setAttribute(Dispatcher.ERROR_EXCEPTION_TYPE,th.getClass()); + request.setAttribute(Dispatcher.ERROR_EXCEPTION,th); if (th instanceof UnavailableException) { UnavailableException ue = (UnavailableException)th;