Class ServletException
java.lang.Object
java.lang.Throwable
java.lang.Exception
javax.servlet.ServletException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
UnavailableException
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 Summary
ConstructorsConstructorDescriptionCreates a new ServletException.ServletException(String message) Creates a new ServletException with a message.ServletException(String message, Throwable cause) Creates a new ServletException with a message and what caused the exception.ServletException(Throwable cause) Creates a new ServletException with what caused the exception. -
Method Summary
Modifier and TypeMethodDescriptionGives the Throwable that caused this exception if known, otherwise null.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ServletException
public ServletException()Creates a new ServletException.- Since:
- Servlet API 2.0
-
ServletException
Creates a new ServletException with a message.- Parameters:
message- why this exception occured- Since:
- Servlet API 1.0
-
ServletException
-
ServletException
Creates a new ServletException with what caused the exception.- Parameters:
cause- what made this exception occurmessage- why this exception occured- Since:
- Servlet API 2.1
-
-
Method Details
-
getRootCause
Gives the Throwable that caused this exception if known, otherwise null.- Returns:
- Throwable that caused this exception
- Since:
- Servlet API 2.1
-