public class DefaultDispatcherErrorHandler extends Object implements DispatcherErrorHandler
DispatcherErrorHandler
which sends Error Report in devMode or HttpServletResponse.sendError(int, java.lang.String)
otherwise.Constructor and Description |
---|
DefaultDispatcherErrorHandler() |
Modifier and Type | Method and Description |
---|---|
protected HashMap<String,Object> |
createReportData(Exception e,
List<Throwable> chain) |
void |
handleError(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
int code,
Exception e)
Handle passed error code or exception
|
protected void |
handleErrorInDevMode(javax.servlet.http.HttpServletResponse response,
int code,
Exception e) |
void |
init(javax.servlet.ServletContext ctx)
Init instance after creating
Dispatcher |
protected void |
sendErrorResponse(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
int code,
Exception e) |
void |
setDevMode(String devMode) |
void |
setFreemarkerManager(FreemarkerManager freemarkerManager) |
public void setFreemarkerManager(FreemarkerManager freemarkerManager)
public void setDevMode(String devMode)
public void init(javax.servlet.ServletContext ctx)
DispatcherErrorHandler
Dispatcher
init
in interface DispatcherErrorHandler
ctx
- current ServletContext
public void handleError(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, int code, Exception e)
DispatcherErrorHandler
handleError
in interface DispatcherErrorHandler
request
- current HttpServletRequest
response
- current HttpServletResponse
code
- HTTP Error Code, see HttpServletResponse
for possible error codese
- Exception to reportprotected void sendErrorResponse(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, int code, Exception e)
protected void handleErrorInDevMode(javax.servlet.http.HttpServletResponse response, int code, Exception e)
Copyright © 2000–2020 Apache Software Foundation. All rights reserved.