javax.servlet

Class ServletException

Known Direct 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

Constructor Summary

ServletException()
Creates 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

Throwable
getRootCause()
Gives the Throwable that caused this exception if known, otherwise null.

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
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