code!=SC_PARTIAL_CONTENT &&
code>=SC_OK)
{
Request request = _connection.getRequest();
ErrorHandler error_handler = null;
ContextHandler.SContext context = request.getContext();
if (context!=null)
error_handler=context.getContextHandler().getErrorHandler();
if (error_handler!=null)
{
// TODO - probably should reset these after the request?
request.setAttribute(ServletHandler.__J_S_ERROR_STATUS_CODE,new Integer(code));
request.setAttribute(ServletHandler.__J_S_ERROR_MESSAGE, message);
request.setAttribute(ServletHandler.__J_S_ERROR_REQUEST_URI, request.getRequestURI());
request.setAttribute(ServletHandler.__J_S_ERROR_SERVLET_NAME,request.getServletName());
error_handler.handle(null,_connection.getRequest(),this, Handler.ERROR);
}
else
{
setHeader(HttpHeaders.CACHE_CONTROL, "must-revalidate,no-cache,no-store");
setContentType(MimeTypes.TEXT_HTML_8859_1);