comparison src/org/eclipse/jetty/server/AbstractHttpConnection.java @ 821:292f2e31ab41

remove ErrorHandler.ErrorPageMapper
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 14 Sep 2016 00:48:03 -0600
parents 8e9db0bbf4f9
children 6ebf86e4d2ca
comparison
equal deleted inserted replaced
820:8e9db0bbf4f9 821:292f2e31ab41
500 async_exception = (Throwable)_request.getAttribute(RequestDispatcher.ERROR_EXCEPTION); 500 async_exception = (Throwable)_request.getAttribute(RequestDispatcher.ERROR_EXCEPTION);
501 _response.setStatus(500,async_exception==null?"Async Timeout":"Async Exception"); 501 _response.setStatus(500,async_exception==null?"Async Timeout":"Async Exception");
502 _request.setAttribute(RequestDispatcher.ERROR_STATUS_CODE,new Integer(500)); 502 _request.setAttribute(RequestDispatcher.ERROR_STATUS_CODE,new Integer(500));
503 _request.setAttribute(RequestDispatcher.ERROR_MESSAGE, _response.getReason()); 503 _request.setAttribute(RequestDispatcher.ERROR_MESSAGE, _response.getReason());
504 _request.setDispatcherType(DispatcherType.ERROR); 504 _request.setDispatcherType(DispatcherType.ERROR);
505
506 ErrorHandler eh = _request._async.getContextHandler().getErrorHandler();
507 if (eh instanceof ErrorHandler.ErrorPageMapper)
508 {
509 String error_page=((ErrorHandler.ErrorPageMapper)eh).getErrorPage((HttpServletRequest)_request._async.getRequest());
510 if (error_page!=null)
511 {
512 AsyncContinuation.AsyncEventState state = _request._async.getAsyncEventState();
513 state.setPath(error_page);
514 }
515 }
516 } 505 }
517 else 506 else
518 _request.setDispatcherType(DispatcherType.ASYNC); 507 _request.setDispatcherType(DispatcherType.ASYNC);
519 server.handleAsync(this); 508 server.handleAsync(this);
520 } 509 }