private static void addErrorPages(Context context) { for (int errorCode : ERROR_PAGE_STATUSES) { ErrorPage errorPage = new ErrorPage(); errorPage.setErrorCode(errorCode); errorPage.setLocation("/error.jspx"); context.addErrorPage(errorPage); } ErrorPage errorPage = new ErrorPage(); errorPage.setExceptionType(Throwable.class.getName()); errorPage.setLocation("/error.jspx"); context.addErrorPage(errorPage); }
log.log(Level.FINE, LogFacade.ERROR_PAGE_LOCATION_EXCEPTION); errorPage.setLocation("/" + location); } else { String msg = MessageFormat.format(rb.getString(LogFacade.ERROR_PAGE_LOCATION_EXCEPTION), location);
log.debug(sm.getString("standardContext.errorPage.warning", location)); errorPage.setLocation("/" + location); } else { throw new IllegalArgumentException
errorPage.setLocation(path); errorPage.setErrorCode(status); errorPage.setReason(reason);
log.debug(sm.getString("standardContext.errorPage.warning", location)); errorPage.setLocation("/" + location); } else { throw new IllegalArgumentException
log.debug(sm.getString("standardContext.errorPage.warning", location)); errorPage.setLocation("/" + location); } else { throw new IllegalArgumentException
log.debug(sm.getString("standardContext.errorPage.warning", location)); errorPage.setLocation("/" + location); } else { throw new IllegalArgumentException
/** * Add an error page for the specified error or Java exception. * * @param errorPage The error page definition to be added */ public void addErrorPage(ErrorPage errorPage) { // Validate the input parameters if (errorPage == null) throw MESSAGES.nullErrorPage(); String location = errorPage.getLocation(); if ((location != null) && !location.startsWith("/")) { if (isServlet22()) { CatalinaLogger.CORE_LOGGER.errorPageStartsWithSlash(location); errorPage.setLocation("/" + location); } else { throw MESSAGES.errorPageMustStartWithSlash(location); } } // Add the specified error page to our internal collections String exceptionType = errorPage.getExceptionType(); if (exceptionType != null) { exceptionPages.put(exceptionType, errorPage); } else { if (errorPage.getErrorCode() == 200) { this.okErrorPage = errorPage; } statusPages.put(errorPage.getErrorCode(), errorPage); } fireContainerEvent("addErrorPage", errorPage); }
log.debug(sm.getString("standardContext.errorPage.warning", location)); errorPage.setLocation("/" + location); } else { throw new IllegalArgumentException
log.debug(sm.getString("standardContext.errorPage.warning", location)); errorPage.setLocation("/" + location); } else { throw new IllegalArgumentException
log.debug(sm.getString("standardContext.errorPage.warning", location)); errorPage.setLocation("/" + location); } else { throw new IllegalArgumentException
errorPage.setErrorCode(value.getErrorCode()); errorPage.setExceptionType(value.getExceptionType()); errorPage.setLocation(value.getLocation()); context.addErrorPage(errorPage);