public void add(ErrorPage errorPage) { String exceptionType = errorPage.getExceptionType(); if (exceptionType == null) { statusPages.put(Integer.valueOf(errorPage.getErrorCode()), errorPage); } else { exceptionPages.put(exceptionType, errorPage); } }
public void remove(ErrorPage errorPage) { String exceptionType = errorPage.getExceptionType(); if (exceptionType == null) { statusPages.remove(Integer.valueOf(errorPage.getErrorCode()), errorPage); } else { exceptionPages.remove(exceptionType, errorPage); } }
public void add(ErrorPage errorPage) { String exceptionType = errorPage.getExceptionType(); if (exceptionType == null) { statusPages.put(Integer.valueOf(errorPage.getErrorCode()), errorPage); } else { exceptionPages.put(exceptionType, errorPage); } }
public void remove(ErrorPage errorPage) { String exceptionType = errorPage.getExceptionType(); if (exceptionType == null) { statusPages.remove(Integer.valueOf(errorPage.getErrorCode()), errorPage); } else { exceptionPages.remove(exceptionType, errorPage); } }
@Override @Deprecated public int[] findStatusPages() { ErrorPage[] errorPages = findErrorPages(); int size = errorPages.length; int temp[] = new int[size]; int count = 0; for (int i = 0; i < size; i++) { if (errorPages[i].getExceptionType() == null) { temp[count++] = errorPages[i].getErrorCode(); } } int result[] = new int[count]; System.arraycopy(temp, 0, result, 0, count); return result; }
@Override @Deprecated public int[] findStatusPages() { ErrorPage[] errorPages = findErrorPages(); int size = errorPages.length; int temp[] = new int[size]; int count = 0; for (int i = 0; i < size; i++) { if (errorPages[i].getExceptionType() == null) { temp[count++] = errorPages[i].getErrorCode(); } } int result[] = new int[count]; System.arraycopy(temp, 0, result, 0, count); return result; }
/** * Remove the error page for the specified error code or * Java language exception, if it exists; otherwise, no action is taken. * * @param errorPage The error page definition to be removed */ @Override public void removeErrorPage(ErrorPage errorPage) { String exceptionType = errorPage.getExceptionType(); if (exceptionType != null) { synchronized (exceptionPages) { exceptionPages.remove(exceptionType); } } else { synchronized (statusPages) { statusPages.remove(Integer.valueOf(errorPage.getErrorCode())); } } fireContainerEvent("removeErrorPage", errorPage); }
String exceptionType = errorPage.getExceptionType(); if (exceptionType != null) { synchronized (exceptionPages) {
if (errorPage.getExceptionType() == null) { appendElement(sb, INDENT4, "error-code", Integer.toString(errorPage.getErrorCode())); } else { appendElement(sb, INDENT4, "exception-type", errorPage.getExceptionType());
String exceptionType = errorPage.getExceptionType(); int errorCode = errorPage.getErrorCode(); if (errorPage.getExceptionType() != null) { appendElement(sb, INDENT4, "exception-type", exceptionType); } else if (errorPage.getErrorCode() > 0) {
String exceptionType = errorPage.getExceptionType(); int errorCode = errorPage.getErrorCode(); if (errorPage.getExceptionType() != null) { appendElement(sb, INDENT4, "exception-type", exceptionType); } else if (errorPage.getErrorCode() > 0) {