From c7f59fd104441f122f44f108f615f04fd586da11 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Fri, 27 Mar 2009 06:02:42 +0000 Subject: [PATCH] mods prior to backport to 2.5 API. These changes should be in both 7 and 8 git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@18 7e9141cc-0065-0410-87d8-b60c137991c4 --- .../eclipse/jetty/servlet/ErrorPageErrorHandler.java | 6 +++--- .../java/org/eclipse/jetty/servlet/ServletHandler.java | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ErrorPageErrorHandler.java b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ErrorPageErrorHandler.java index a40bdab5a8b..a76c2398ad7 100644 --- a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ErrorPageErrorHandler.java +++ b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ErrorPageErrorHandler.java @@ -70,14 +70,14 @@ public class ErrorPageErrorHandler extends ErrorHandler if (_errorPages!=null) { String error_page= null; - Class exClass= (Class)request.getAttribute(RequestDispatcher.ERROR_EXCEPTION_TYPE); + Class exClass= (Class)request.getAttribute(Dispatcher.ERROR_EXCEPTION_TYPE); if (ServletException.class.equals(exClass)) { error_page= (String)_errorPages.get(exClass.getName()); if (error_page == null) { - Throwable th= (Throwable)request.getAttribute(RequestDispatcher.ERROR_EXCEPTION); + Throwable th= (Throwable)request.getAttribute(Dispatcher.ERROR_EXCEPTION); while (th instanceof ServletException) th= ((ServletException)th).getRootCause(); if (th != null) @@ -94,7 +94,7 @@ public class ErrorPageErrorHandler extends ErrorHandler if (error_page == null) { // look for an exact code match - Integer code=(Integer)request.getAttribute(RequestDispatcher.ERROR_STATUS_CODE); + Integer code=(Integer)request.getAttribute(Dispatcher.ERROR_STATUS_CODE); if (code!=null) { error_page= (String)_errorPages.get(TypeUtil.toString(code.intValue())); 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 787ff527623..c02d9361277 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 @@ -314,7 +314,7 @@ public class ServletHandler extends AbstractHandler final String old_path_info=base_request.getPathInfo(); UserIdentity scoped_identity = null; - DispatcherType type = request.getDispatcherType(); + DispatcherType type = base_request.getDispatcherType(); Object request_listeners=null; ServletRequestEvent request_event=null; ServletHolder servlet_holder=null; @@ -470,8 +470,8 @@ public class ServletHandler extends AbstractHandler // TODO httpResponse.getHttpConnection().forceClose(); 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; @@ -496,8 +496,8 @@ public class ServletHandler extends AbstractHandler // TODO httpResponse.getHttpConnection().forceClose(); if (!response.isCommitted()) { - request.setAttribute(RequestDispatcher.ERROR_EXCEPTION_TYPE,e.getClass()); - request.setAttribute(RequestDispatcher.ERROR_EXCEPTION,e); + request.setAttribute(Dispatcher.ERROR_EXCEPTION_TYPE,e.getClass()); + request.setAttribute(Dispatcher.ERROR_EXCEPTION,e); response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,e.getMessage()); } else