com.ibm.websphere.servlet.error
Class ServletErrorReport
java.lang.Object
|
+--java.lang.Throwable
|
+--java.lang.Exception
|
+--javax.servlet.ServletException
|
+--com.ibm.websphere.servlet.error.ServletErrorReport
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- ResponseErrorReport
- public class ServletErrorReport
- extends javax.servlet.ServletException
Represents an error reported by a servlet.
Servlets can report errors to the server 2 ways:
1. servlets can explicitly call HttpServletResponse.sendError
2. servlets can throw uncaught Exceptions.
- See Also:
- Serialized Form
Field Summary |
static java.lang.String |
ATTRIBUTE_NAME
The request-scoped attribute name that is used to retrieve a servlet error report.
attribute name: ErrorReport |
Constructor Summary |
ServletErrorReport()
|
ServletErrorReport(java.lang.String message)
Constructs a new ServletErrorReport with the specified message. |
ServletErrorReport(java.lang.String message,
java.lang.Throwable rootCause)
Constructs a new ServletErrorReport with the specified message
and root cause. |
ServletErrorReport(java.lang.Throwable rootCause)
Constructs a new ServletErrorReport with the specified message
and root cause. |
Method Summary |
int |
getErrorCode()
Return the error code associated with this error. |
java.lang.String |
getMessage()
Returns a detailed message about the error. |
java.lang.String |
getStackTrace()
Returns the stack trace as a string. |
java.lang.String |
getTargetServletName()
Returns the name of the servlet that reported the error. |
Methods inherited from class javax.servlet.ServletException |
getRootCause |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getLocalizedMessage, printStackTrace, printStackTrace, printStackTrace, toString |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ATTRIBUTE_NAME
public static final java.lang.String ATTRIBUTE_NAME
- The request-scoped attribute name that is used to retrieve a servlet error report.
attribute name: ErrorReport
ServletErrorReport
public ServletErrorReport()
ServletErrorReport
public ServletErrorReport(java.lang.String message)
- Constructs a new ServletErrorReport with the specified message.
- Parameters:
message
- Message of exception
ServletErrorReport
public ServletErrorReport(java.lang.String message,
java.lang.Throwable rootCause)
- Constructs a new ServletErrorReport with the specified message
and root cause.
- Parameters:
message
- Message of exceptionrootCause
- Exception that caused this exception to be raised
ServletErrorReport
public ServletErrorReport(java.lang.Throwable rootCause)
- Constructs a new ServletErrorReport with the specified message
and root cause.
- Parameters:
rootCause
- Exception that caused this exception to be raised
getMessage
public java.lang.String getMessage()
- Returns a detailed message about the error.
- Overrides:
getMessage
in class java.lang.Throwable
getStackTrace
public java.lang.String getStackTrace()
- Returns the stack trace as a string.
getErrorCode
public int getErrorCode()
- Return the error code associated with this error.
getTargetServletName
public java.lang.String getTargetServletName()
- Returns the name of the servlet that reported the error.