Class ErrorAttributes


  • public class ErrorAttributes
    extends java.lang.Object
    Represents additional error attributes present in a ServletRequest when the servlet container is handling an error or a forward to an error page mapped by error-page element in web.xml. See documentation for the following request attributes for the values stored in this object:
    • RequestDispatcher.ERROR_STATUS_CODE
    • RequestDispatcher.ERROR_MESSAGE
    • RequestDispatcher.ERROR_REQUEST_URI
    • RequestDispatcher.ERROR_SERVLET_NAME
    • RequestDispatcher.ERROR_EXCEPTION_TYPE
    • RequestDispatcher.ERROR_EXCEPTION
    Author:
    igor
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Throwable getException()
      Gets exception.
      java.lang.Class<? extends java.lang.Throwable> getExceptionType()
      Gets exceptionType.
      java.lang.String getMessage()
      Gets message.
      java.lang.String getRequestUri()
      Gets requestUri.
      java.lang.String getServletName()
      Gets servletName.
      java.lang.Integer getStatusCode()
      Gets statusCode.
      static ErrorAttributes of​(javax.servlet.http.HttpServletRequest request, java.lang.String filterPrefix)
      Factory for creating instances of this class.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • getStatusCode

        public java.lang.Integer getStatusCode()
        Gets statusCode.
        Returns:
        statusCode
      • getMessage

        public java.lang.String getMessage()
        Gets message.
        Returns:
        message
      • getRequestUri

        public java.lang.String getRequestUri()
        Gets requestUri.
        Returns:
        requestUri
      • getServletName

        public java.lang.String getServletName()
        Gets servletName.
        Returns:
        servletName
      • getExceptionType

        public java.lang.Class<? extends java.lang.Throwable> getExceptionType()
        Gets exceptionType.
        Returns:
        exceptionType
      • getException

        public java.lang.Throwable getException()
        Gets exception.
        Returns:
        exception
      • of

        public static ErrorAttributes of​(javax.servlet.http.HttpServletRequest request,
                                         java.lang.String filterPrefix)
        Factory for creating instances of this class.
        Parameters:
        request -
        Returns:
        instance of request contains error attributes or null if it does not.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object