public class BaseServlet
extends javax.servlet.http.HttpServlet
Modifier and Type | Method and Description |
---|---|
void | handleError(javax.servlet.http.HttpServletResponse response, java.lang.String errorMessage, java.lang.Throwable t) Convenience method for handling unrecoverable errors. |
void | handleError(javax.servlet.http.HttpServletResponse response, java.lang.Throwable t) |
public void handleError(javax.servlet.http.HttpServletResponse response, java.lang.Throwable t)
public void handleError(javax.servlet.http.HttpServletResponse response, java.lang.String errorMessage, java.lang.Throwable t)
Throwable
will be written to provided HTTP response. If servlet.sendStackTraceToClient
framework setting is true
then stacktrace
will also be included. Error with additionally provided errorMessage
and stacktrace
will be printed to log as well.
response
- HTTP responseerrorMessage
- error message for logging onlyt
- error to write