Class ServletErrorEvent

All Implemented Interfaces:

public class ServletErrorEvent extends ServletEvent
Event that reports a servlet error.
See Also:
  • Constructor Details

    • ServletErrorEvent

      public ServletErrorEvent(Object source, javax.servlet.ServletContext context, String servletName, String servletClassName, Throwable error)
      ServletErrorEvent constructor
      source - the source of the event.
      servletName - the name of the servlet that triggered the event.
      error - the error that caused the event.
  • Method Details

    • getError

      public Throwable getError()
      Returns the top-level error.
    • getRootCause

      public Throwable getRootCause()
      Get the original cause of the error. Use of ServletExceptions by the engine to rethrow errors can cause the original error to be buried within one or more exceptions. This method will sift through the wrapped ServletExceptions to return the original error.