protected ActionForward processException(HttpServletRequest request,
HttpServletResponse response, Exception exception, ActionForm form,
ActionMapping mapping)
throws IOException, ServletException {
// Is there a defined handler for this exception?
ExceptionConfig config = mapping.findException(exception.getClass());
if (config == null) {
log.warn(getInternal().getMessage("unhandledException",
exception.getClass()));
if (exception instanceof IOException) {
throw (IOException) exception;
} else if (exception instanceof ServletException) {
throw (ServletException) exception;
} else {
throw new ServletException(exception);
}
}
// Use the configured exception handling
try {
ExceptionHandler handler =
(ExceptionHandler) RequestUtils.applicationInstance(config
.getHandler());
return (handler.execute(exception, config, mapping, form, request,
response));
} catch (Exception e) {