Package org.apache.struts2.dispatcher
Interface DispatcherErrorHandler
- All Known Implementing Classes:
- DefaultDispatcherErrorHandler
public interface DispatcherErrorHandler
Implementation of this interface is used to handle internal errors or missing resources.
 Basically it sends back HTTP error codes or error page depends on requirements.
- 
Method SummaryModifier and TypeMethodDescriptionvoidhandleError(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, int code, Exception e) Handle passed error code or exceptionvoidinit(jakarta.servlet.ServletContext ctx) Init instance after creatingDispatcher
- 
Method Details- 
initvoid init(jakarta.servlet.ServletContext ctx) Init instance after creatingDispatcher- Parameters:
- ctx- current- ServletContext
 
- 
handleErrorvoid handleError(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, int code, Exception e) Handle passed error code or exception- Parameters:
- request- current- HttpServletRequest
- response- current- HttpServletResponse
- code- HTTP Error Code, see- HttpServletResponsefor possible error codes
- e- Exception to report
 
 
-