com.ibm.websphere.servlet.event

Class ServletErrorEvent

  1. java.lang.Object
  2. extended byjava.util.EventObject
  3. extended bycom.ibm.websphere.servlet.event.ApplicationEvent
  4. extended bycom.ibm.websphere.servlet.event.ServletEvent
  5. extended bycom.ibm.websphere.servlet.event.ServletErrorEvent
All implemented interfaces:
java.io.Serializable

  1. public class ServletErrorEvent
  2. extends ServletEvent
Event that reports a servlet error.
See Also:
Serialized Form

Field Summary

Fields inherited from class java.util.EventObject
source

Constructor Summary

Constructor and Description
ServletErrorEvent(java.lang.Object source,javax.servlet.ServletContext context,java.lang.String servletName,java.lang.String servletClassName,java.lang.Throwable error)
ServletErrorEvent constructor

Method Summary

Modifier and Type Method and Description
  1. java.lang.Throwable
getError()
Returns the top-level error.
  1. java.lang.Throwable
getRootCause()
Get the original cause of the error.
Methods inherited from class com.ibm.websphere.servlet.event.ServletEvent
getServletClassName, getServletName
Methods inherited from class com.ibm.websphere.servlet.event.ApplicationEvent
getServletContext, getServletNames
Methods inherited from class java.util.EventObject
getSource, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

ServletErrorEvent

  1. public ServletErrorEvent(java.lang.Object source,
  2. javax.servlet.ServletContext context,
  3. java.lang.String servletName,
  4. java.lang.String servletClassName,
  5. java.lang.Throwable error)
ServletErrorEvent constructor
Parameters:
source - the source of the event.
servletName - the name of the servlet that triggered the event.
error - the error that caused the event.

Method Detail

getError

  1. public java.lang.Throwable getError( )
Returns the top-level error.

getRootCause

  1. public java.lang.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.