# Class ErrorPageSupport

java.lang.Object
org.apache.catalina.util.ErrorPageSupport

public class ErrorPageSupport extends Object
Provides support for tracking per exception type and per HTTP status code error pages.

## Constructor Summary

Constructors
Constructor
Description
`ErrorPageSupport()`
Default constructor for ErrorPageSupport.

## Method Summary

Modifier and Type
Method
Description
`void`
`add(ErrorPage errorPage)`
Adds an error page to the support.
`ErrorPage`
`find(int statusCode)`
Finds the ErrorPage, if any, for the given HTTP status code.
`ErrorPage`
`find(String exceptionType)`
Find the ErrorPage, if any, for the named exception type.
`ErrorPage`
`find(Throwable exception)`
Find the ErrorPage, if any, for the given exception, searching up the exception's class hierarchy.
`ErrorPage[]`
`findAll()`
Returns all configured error pages.
`void`
`remove(ErrorPage errorPage)`
Removes an error page from the support.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### ErrorPageSupport

public ErrorPageSupport()
Default constructor for ErrorPageSupport.

## Method Details

### add

public void add(ErrorPage errorPage)
Adds an error page to the support.

Parameters:
  `errorPage` - The error page to add

### remove

public void remove(ErrorPage errorPage)
Removes an error page from the support.

Parameters:
  `errorPage` - The error page to remove

### find

public ErrorPage find(int statusCode)
Finds the ErrorPage, if any, for the given HTTP status code.

Parameters:
  `statusCode` - The HTTP status code
Returns:
  The ErrorPage for the status code, or `null` if none is configured

### find

public ErrorPage find(String exceptionType)
Find the ErrorPage, if any, for the named exception type.

Parameters:
  `exceptionType` - The fully qualified class name of the exception type
Returns:
  The ErrorPage for the named exception type, or `null` if none is configured

### find

public ErrorPage find(Throwable exception)
Find the ErrorPage, if any, for the given exception, searching up the exception's class hierarchy.

Parameters:
  `exception` - The exception instance
Returns:
  The ErrorPage for the exception, or `null` if none is configured

### findAll

public ErrorPage[] findAll()
Returns all configured error pages.

Returns:
  Array of all configured error pages