Class ServletException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
UnavailableException

public class ServletException extends Exception
This exception is thrown by a servlet when a servlet related problem occurs.
Since:
Servlet API 1.0
Version:
Servlet API 2.2
See Also:
  • Constructor Details

    • ServletException

      public ServletException()
      Creates a new ServletException.
      Since:
      Servlet API 2.0
    • ServletException

      public ServletException(String message)
      Creates a new ServletException with a message.
      Parameters:
      message - why this exception occured
      Since:
      Servlet API 1.0
    • ServletException

      public ServletException(String message, Throwable cause)
      Creates a new ServletException with a message and what caused the exception.
      Parameters:
      message - why this exception occured
      cause - what made this exception occur
      Since:
      Servlet API 2.1
    • ServletException

      public ServletException(Throwable cause)
      Creates a new ServletException with what caused the exception.
      Parameters:
      cause - what made this exception occur
      message - why this exception occured
      Since:
      Servlet API 2.1
  • Method Details

    • getRootCause

      public Throwable getRootCause()
      Gives the Throwable that caused this exception if known, otherwise null.
      Returns:
      Throwable that caused this exception
      Since:
      Servlet API 2.1