Class ErrorPage
java.lang.Object
org.apache.tomcat.util.descriptor.web.XmlEncodingBase
org.apache.tomcat.util.descriptor.web.ErrorPage
- All Implemented Interfaces:
Serializable
Representation of an error page element for a web application, as represented in a
<error-page>
element in the deployment descriptor.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the error code for which this error page is active.Returns the exception type for which this error page is active.Returns the context-relative location to handle this error or exception.getName()Returns the name of this error page, which is either the exception type or the error code.voidsetErrorCode(int errorCode) Set the error code.voidsetErrorCode(String errorCode) Set the error code (hack for default XmlMapper data type).voidsetExceptionType(String exceptionType) Set the exception type.voidsetLocation(String location) Set the location.voidsetLocationDecoded(String location) Set the already URL decoded location.toString()Render a String representation of this object.Methods inherited from class XmlEncodingBase
getCharset, setCharset
-
Constructor Details
-
ErrorPage
public ErrorPage()Default constructor for ErrorPage.
-
-
Method Details
-
getErrorCode
public int getErrorCode()Returns the error code for which this error page is active.- Returns:
- the error code
-
setErrorCode
public void setErrorCode(int errorCode) Set the error code.- Parameters:
errorCode- The new error code
-
setErrorCode
Set the error code (hack for default XmlMapper data type).- Parameters:
errorCode- The new error code
-
getExceptionType
Returns the exception type for which this error page is active.- Returns:
- the fully qualified exception type name, or
nullif none
-
setExceptionType
Set the exception type.- Parameters:
exceptionType- The new exception type
-
getLocation
Returns the context-relative location to handle this error or exception.- Returns:
- the location
-
setLocation
-
setLocationDecoded
Set the already URL decoded location.- Parameters:
location- The new location
-
toString
-
getName
Returns the name of this error page, which is either the exception type or the error code.- Returns:
- the error page name
-