From be21358db737e695d4c35fb7ab48dd6adc14212b Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Fri, 15 Oct 2010 14:05:22 +0000 Subject: [PATCH] reintroduced getHandler(request, cache) in deprecated form (after removing it in 3.0.4) --- .../web/servlet/DispatcherServlet.java | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/DispatcherServlet.java b/org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/DispatcherServlet.java index dda747cb72..8295388d93 100644 --- a/org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/DispatcherServlet.java +++ b/org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/DispatcherServlet.java @@ -750,7 +750,7 @@ public class DispatcherServlet extends FrameworkServlet { processedRequest = checkMultipart(request); // Determine handler for the current request. - mappedHandler = getHandler(processedRequest); + mappedHandler = getHandler(processedRequest, false); if (mappedHandler == null || mappedHandler.getHandler() == null) { noHandlerFound(processedRequest, response); return; @@ -905,7 +905,21 @@ public class DispatcherServlet extends FrameworkServlet { /** * Return the HandlerExecutionChain for this request. Try all handler mappings in order. * @param request current HTTP request - * @return the HandlerExceutionChain, or null if no handler could be found + * @param cache whether to cache the HandlerExecutionChain in a request attribute + * @return the HandlerExecutionChain, or null if no handler could be found + * @deprecated as of Spring 3.0.4, in favor of {@link #getHandler(javax.servlet.http.HttpServletRequest)}, + * with this method's cache attribute now effectively getting ignored + */ + @Deprecated + protected HandlerExecutionChain getHandler(HttpServletRequest request, boolean cache) throws Exception { + return getHandler(request); + } + + /** + * Return the HandlerExecutionChain for this request. + *

Tries all handler mappings in order. + * @param request current HTTP request + * @return the HandlerExecutionChain, or null if no handler could be found */ protected HandlerExecutionChain getHandler(HttpServletRequest request) throws Exception { for (HandlerMapping hm : this.handlerMappings) {