javax.servlet
Class ServletException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by javax.servlet.ServletException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
JspParseException, ServletConfigException, ServletLineConfigException, UnavailableException

public class ServletException
extends java.lang.Exception

A servlet exception. ServletException can wrap another exception, so the servlet can rethrow an exception to the servlet engine.


 try {
   ...;
 } catch (Exception e) {
   throw new ServletException(e);
 }
 

See Also:
Serialized Form

Constructor Summary
ServletException()
          Basic exception constructor.
ServletException(java.lang.String message)
          Create a new servlet exception with a message.
ServletException(java.lang.String message, java.lang.Throwable cause)
          Create a new servlet exception with a message and a wrapped exception.
ServletException(java.lang.Throwable cause)
          Create a new servlet exception with a wrapped exception.
 
Method Summary
 java.lang.Throwable getRootCause()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServletException

public ServletException()
Basic exception constructor.


ServletException

public ServletException(java.lang.String message)
Create a new servlet exception with a message.


ServletException

public ServletException(java.lang.String message,
                        java.lang.Throwable cause)
Create a new servlet exception with a message and a wrapped exception.


ServletException

public ServletException(java.lang.Throwable cause)
Create a new servlet exception with a wrapped exception.

Method Detail

getRootCause

public java.lang.Throwable getRootCause()