Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.servlet
Class ServletException

    java.lang.Object
      |
      +--java.lang.Throwable
            |
            +--java.lang.Exception
                  |
                  +--javax.servlet.ServletException

All Implemented Interfaces:
  java.io.Serializable

Direct Known Subclasses:
  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()` Returns any wrapped exception.

Methods inherited from class java.lang.Throwable
`fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, 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()

  Returns any wrapped exception.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD