if (exception == null)
return (null);
- Class clazz = exception.getClass();
+ Class<?> clazz = exception.getClass();
String name = clazz.getName();
while (!Object.class.equals(clazz)) {
ErrorPage errorPage = context.findErrorPage(name);
request.setPathInfo(errorPage.getLocation());
try {
-
- // Reset the response if possible (else IllegalStateException)
- //hres.reset();
// Reset the response (keeping the real error code and message)
- Integer statusCodeObj =
- (Integer) request.getAttribute(Globals.STATUS_CODE_ATTR);
- int statusCode = statusCodeObj.intValue();
- String message =
- (String) request.getAttribute(Globals.ERROR_MESSAGE_ATTR);
- response.reset(statusCode, message);
+ response.resetBuffer();
// Forward control to the specified location
ServletContext servletContext =