Class ErrorPageDescriptor
- java.lang.Object
-
- org.glassfish.web.deployment.descriptor.ErrorPageDescriptor
-
- All Implemented Interfaces:
Serializable
public class ErrorPageDescriptor extends Object implements Serializable
Objects exhiniting this interface represent an error page and the exception type or error code that will cause the redirect from the web container.- Author:
- Danny Coward
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ErrorPageDescriptor()The default constructor.ErrorPageDescriptor(int errorCode, String location)Constructor for error code to error page mapping.ErrorPageDescriptor(String exceptionType, String location)Constructor for Java exception type to error page mapping.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetErrorCode()Return the error code.StringgetErrorSignifierAsString()If there is an exception type, then the exception type is returned.StringgetExceptionType()Return the exception type or the empty string if none.StringgetLocation()Return the page to map tovoidprint(StringBuilder toStringBuilder)voidsetErrorCode(int errorCode)Sets the error code.voidsetErrorSignifierAsString(String errorSignifier)Sets the error code if the argument is parsable as an int, or the exception type else.voidsetExceptionType(String exceptionType)Sets the exception type.voidsetLocation(String location)
-
-
-
Constructor Detail
-
ErrorPageDescriptor
public ErrorPageDescriptor()
The default constructor.
-
ErrorPageDescriptor
public ErrorPageDescriptor(int errorCode, String location)Constructor for error code to error page mapping.
-
-
Method Detail
-
getErrorCode
public int getErrorCode()
Return the error code. -1 if none.
-
setErrorCode
public void setErrorCode(int errorCode)
Sets the error code.
-
getErrorSignifierAsString
public String getErrorSignifierAsString()
If there is an exception type, then the exception type is returned. Otherwise, if the error code is not -1, then the error code is returned as a string. If the error code is -1, then nul is returned.
-
setErrorSignifierAsString
public void setErrorSignifierAsString(String errorSignifier)
Sets the error code if the argument is parsable as an int, or the exception type else.
-
getExceptionType
public String getExceptionType()
Return the exception type or the empty string if none.
-
setExceptionType
public void setExceptionType(String exceptionType)
Sets the exception type.
-
getLocation
public String getLocation()
Return the page to map to
-
setLocation
public void setLocation(String location)
-
print
public void print(StringBuilder toStringBuilder)
-
-