/** * Return the context-relative URI of the error page for the specified * HTTP status code, if any; otherwise return <code>null</code>. * * @param status HTTP status code to look up */ @Override public String findStatusPage(int status) { ErrorPage errorPage = statusPages.get(Integer.valueOf(status)); if (errorPage!=null) { return errorPage.getLocation(); } return null; }
/** * Return the context-relative URI of the error page for the specified * HTTP status code, if any; otherwise return <code>null</code>. * * @param status HTTP status code to look up */ @Override public String findStatusPage(int status) { ErrorPage errorPage = statusPages.get(Integer.valueOf(status)); if (errorPage!=null) { return errorPage.getLocation(); } return null; }
/** * Return the context-relative URI of the error page for the specified * HTTP status code, if any; otherwise return <code>null</code>. * * @param status HTTP status code to look up */ @Override public String findStatusPage(int status) { ErrorPage errorPage = statusPages.get(Integer.valueOf(status)); if (errorPage!=null) { return errorPage.getLocation(); } return null; }
/** * Return the context-relative URI of the error page for the specified * HTTP status code, if any; otherwise return <code>null</code>. * * @param status HTTP status code to look up */ @Override public String findStatusPage(int status) { ErrorPage errorPage = statusPages.get(Integer.valueOf(status)); if (errorPage!=null) { return errorPage.getLocation(); } return null; }
/** * Return the context-relative URI of the error page for the specified * HTTP status code, if any; otherwise return <code>null</code>. * * @param status HTTP status code to look up */ @Override public String findStatusPage(int status) { ErrorPage errorPage = statusPages.get(Integer.valueOf(status)); if (errorPage!=null) { return errorPage.getLocation(); } return null; }
servletContext.getRequestDispatcher(errorPage.getLocation()); dispatcher.dispatch(request, response, DispatcherType.ERROR); } catch (IllegalStateException ise) {
errorPage.getLocation()); sreq.setAttribute(RequestDispatcher.ERROR_REQUEST_URI, ((HttpServletRequest) sreq).getRequestURI());
throw new IllegalArgumentException (sm.getString("standardContext.errorPage.required")); String location = errorPage.getLocation(); if ((location != null) && !location.startsWith("/")) { if (isServlet22()) {
container.getLogger().debug("Processing " + errorPage); request.setPathInfo(errorPage.getLocation()); request.getContext().getServletContext(); RequestDispatcher rd = servletContext.getRequestDispatcher(errorPage.getLocation()); rd.forward(request.getRequest(), response.getResponse()); container.getLogger().error(MESSAGES.errorProcessingErrorPage(errorPage.getLocation()), t); return (false);
container.getLogger().debug("Processing " + errorPage); request.setPathInfo(errorPage.getLocation()); request.getContext().getServletContext(); RequestDispatcher rd = servletContext.getRequestDispatcher(errorPage.getLocation()); rd.forward(request.getRequest(), response.getResponse());
throw new IllegalArgumentException (sm.getString("standardContext.errorPage.required")); String location = errorPage.getLocation(); if ((location != null) && !location.startsWith("/")) { if (isServlet22()) {
container.getLogger().debug("Processing " + errorPage); request.setPathInfo(errorPage.getLocation()); request.getContext().getServletContext(); RequestDispatcher rd = servletContext.getRequestDispatcher(errorPage.getLocation()); rd.forward(request.getRequest(), response.getResponse());
request.getContext().getServletContext(); ApplicationDispatcher dispatcher = (ApplicationDispatcher) servletContext.getRequestDispatcher(errorPage.getLocation()); if (log.isLoggable(Level.INFO)) { String msg = MessageFormat.format(rb.getString(LogFacade.CANNOT_PROCESS_ERROR_PAGE_INFO), errorPage.getLocation()); log.log(Level.INFO, msg, t);
throw new IllegalArgumentException (sm.getString("standardContext.errorPage.required")); String location = errorPage.getLocation(); if ((location != null) && !location.startsWith("/")) { if (isServlet22()) {
throw new IllegalArgumentException (sm.getString("standardContext.errorPage.required")); String location = errorPage.getLocation(); if ((location != null) && !location.startsWith("/")) { if (isServlet22()) {
throw new IllegalArgumentException (sm.getString("standardContext.errorPage.required")); String location = errorPage.getLocation(); if ((location != null) && !location.startsWith("/")) { if (isServlet22()) {
throw new IllegalArgumentException (sm.getString("standardContext.errorPage.required")); String location = errorPage.getLocation(); if ((location != null) && !location.startsWith("/")) { if (isServlet22()) {
/** * 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); }
container.getLogger().debug("Processing " + errorPage); request.setPathInfo(errorPage.getLocation()); request.getContext().getServletContext(); RequestDispatcher rd = servletContext.getRequestDispatcher(errorPage.getLocation());
request.getContext().getServletContext(); RequestDispatcher rd = servletContext.getRequestDispatcher(errorPage.getLocation());