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
This commit is contained in:
Greg Wilkins 2009-03-27 06:02:42 +00:00
parent 9f386395e7
commit c7f59fd104
2 changed files with 8 additions and 8 deletions

View File

@ -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()));

View File

@ -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