Top Description Fields Constructors Methods
org.apache.tomcat.util.descriptor.web

public Class ErrorPage

extends XmlEncodingBase
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
java.io.Serializable, org.apache.tomcat.util.buf.UDecoder

Representation of an error page element for a web application, as represented in a <error-page> element in the deployment descriptor.
Author
Craig R. McClanahan

Field Summary

Modifier and TypeField and Description
private int
errorCode

The error (status) code for which this error page is active.

private String
exceptionType

The exception type for which this error page is active.

private String
location

The context-relative location to handle this error or exception.

private static final long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the error code.
getErrorCode
()

public String

Returns:

the exception type.
getExceptionType
()

public String

Returns:

the location.
getLocation
()

public String
public void
setErrorCode(int
The new error code
errorCode
)

Set the error code.

public void
setErrorCode(String
The new error code
errorCode
)

Set the error code (hack for default XmlMapper data type).

public void
setExceptionType(String
The new exception type
exceptionType
)

Set the exception type.

public void
setLocation(String
The new location
location
)

Set the location.

public String
toString()

Overrides java.lang.Object.toString.

Render a String representation of this object.

Inherited from org.apache.tomcat.util.descriptor.web.XmlEncodingBase:
getCharsetsetCharset

Field Detail

errorCodeback to summary
private int errorCode

The error (status) code for which this error page is active. Note that status code 0 is used for the default error page.

exceptionTypeback to summary
private String exceptionType

The exception type for which this error page is active.

locationback to summary
private String location

The context-relative location to handle this error or exception.

serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

ErrorPageback to summary
public ErrorPage()

Method Detail

getErrorCodeback to summary
public int getErrorCode()
Returns:int

the error code.

getExceptionTypeback to summary
public String getExceptionType()
Returns:String

the exception type.

getLocationback to summary
public String getLocation()
Returns:String

the location.

getNameback to summary
public String getName()
setErrorCodeback to summary
public void setErrorCode(int errorCode)

Set the error code.

Parameters
errorCode:int

The new error code

setErrorCodeback to summary
public void setErrorCode(String errorCode)

Set the error code (hack for default XmlMapper data type).

Parameters
errorCode:String

The new error code

setExceptionTypeback to summary
public void setExceptionType(String exceptionType)

Set the exception type.

Parameters
exceptionType:String

The new exception type

setLocationback to summary
public void setLocation(String location)

Set the location.

Parameters
location:String

The new location

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Render a String representation of this object.

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object

Annotations
@Override