Class ErrorPage

java.lang.Object
com.jk.web.embedded.spring.ErrorPage

public class ErrorPage extends Object
This class represents a configuration for handling error pages in a web application.
Version:
1.0
Author:
Dr. Jalal H. Kiswani
  • Constructor Details

    • ErrorPage

      public ErrorPage(String path)
      This method constructs a new ErrorPage with the provided path to the error page.
      Parameters:
      path - Specifies the path to the error page.
    • ErrorPage

      public ErrorPage(JKHttpStatus status, String path)
      This method constructs a new ErrorPage with the provided path to the error page and HTTP status code.
      Parameters:
      status - Specifies the HTTP status code.
      path - Specifies the path to the error page.
    • ErrorPage

      public ErrorPage(Class<? extends Throwable> exception, String path)
      This method constructs a new ErrorPage with the provided path to the error page and exception type.
      Parameters:
      exception - Specifies the exception type.
      path - Specifies the path to the error page.
  • Method Details

    • getPath

      public String getPath()
      This method retrieves the path to the error page.
      Returns:
      the path to the error page.
    • getException

      public Class<? extends Throwable> getException()
      This method retrieves the exception type.
      Returns:
      the exception type.
    • getStatus

      public JKHttpStatus getStatus()
      This method retrieves the HTTP status code.
      Returns:
      the HTTP status code.
    • getStatusCode

      public int getStatusCode()
      This method retrieves the HTTP status code value.
      Returns:
      the HTTP status code value.
    • getExceptionName

      public String getExceptionName()
      This method retrieves the exception type name.
      Returns:
      the exception type name.
    • isGlobal

      public boolean isGlobal()
      This method check whether this error page is global or not.
      Returns:
      true, if it is global, false otherwise.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object