Class ErrorPage

  • All Implemented Interfaces:
    java.io.Serializable

    public class ErrorPage
    extends XmlEncodingBase
    implements java.io.Serializable
    Representation of an error page element for a web application, as represented in a <error-page> element in the deployment descriptor.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      ErrorPage()
      Default constructor for ErrorPage.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getErrorCode()
      Returns the error code for which this error page is active.
      java.lang.String getExceptionType()
      Returns the exception type for which this error page is active.
      java.lang.String getLocation()
      Returns the context-relative location to handle this error or exception.
      java.lang.String getName()
      Returns the name of this error page, which is either the exception type or the error code.
      void setErrorCode​(int errorCode)
      Set the error code.
      void setErrorCode​(java.lang.String errorCode)
      Set the error code (hack for default XmlMapper data type).
      void setExceptionType​(java.lang.String exceptionType)
      Set the exception type.
      void setLocation​(java.lang.String location)
      Set the location.
      void setLocationDecoded​(java.lang.String location)
      Set the already URL decoded location.
      java.lang.String toString()
      Render a String representation of this object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ErrorPage

        public ErrorPage()
        Default constructor for ErrorPage.
    • Method Detail

      • 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

        public void setErrorCode​(java.lang.String errorCode)
        Set the error code (hack for default XmlMapper data type).
        Parameters:
        errorCode - The new error code
      • getExceptionType

        public java.lang.String getExceptionType()
        Returns the exception type for which this error page is active.
        Returns:
        the fully qualified exception type name, or null if none
      • setExceptionType

        public void setExceptionType​(java.lang.String exceptionType)
        Set the exception type.
        Parameters:
        exceptionType - The new exception type
      • getLocation

        public java.lang.String getLocation()
        Returns the context-relative location to handle this error or exception.
        Returns:
        the location
      • setLocation

        public void setLocation​(java.lang.String location)
        Set the location.
        Parameters:
        location - The new location
      • setLocationDecoded

        public void setLocationDecoded​(java.lang.String location)
        Set the already URL decoded location.
        Parameters:
        location - The new location
      • toString

        public java.lang.String toString()
        Render a String representation of this object.
        Overrides:
        toString in class java.lang.Object
      • getName

        public java.lang.String getName()
        Returns the name of this error page, which is either the exception type or the error code.
        Returns:
        the error page name