DispatcherServlet.processHandlerException checks whether the ModelAndView is empty before rendering it.

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@847 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
Arjen Poutsma 2009-03-27 15:41:03 +00:00
parent 8fe681fa4c
commit 0d33ceec1b
1 changed files with 3 additions and 0 deletions

View File

@ -1059,6 +1059,9 @@ public class DispatcherServlet extends FrameworkServlet {
exMv = it.next().resolveException(request, response, handler, ex);
}
if (exMv != null) {
if (exMv.isEmpty()) {
return null;
}
if (logger.isDebugEnabled()) {
logger.debug("Handler execution resulted in exception - forwarding to resolved error view: " + exMv, ex);
}