From 334a294e2a5c57250bfeb5847d16339b5b535862 Mon Sep 17 00:00:00 2001 From: Jeremy Grelle Date: Mon, 13 Sep 2010 19:58:26 +0000 Subject: [PATCH] SPR-7553 - DefaultServletHttpRequestHandler fails on Google App Engine --- .../servlet/resource/DefaultServletHttpRequestHandler.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/resource/DefaultServletHttpRequestHandler.java b/org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/resource/DefaultServletHttpRequestHandler.java index 55a81ae581..1cc5752184 100644 --- a/org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/resource/DefaultServletHttpRequestHandler.java +++ b/org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/resource/DefaultServletHttpRequestHandler.java @@ -52,6 +52,9 @@ public class DefaultServletHttpRequestHandler implements HttpRequestHandler, Ser /** Default Servlet name used by Tomcat, Jetty, JBoss, and GlassFish */ private static final String COMMON_DEFAULT_SERVLET_NAME = "default"; + /** Default Servlet name used by Google App Engine */ + private static final String GAE_DEFAULT_SERVLET_NAME = "_ah_default"; + /** Default Servlet name used by Resin */ private static final String RESIN_DEFAULT_SERVLET_NAME = "resin-file"; @@ -85,6 +88,9 @@ public class DefaultServletHttpRequestHandler implements HttpRequestHandler, Ser if (this.servletContext.getNamedDispatcher(COMMON_DEFAULT_SERVLET_NAME) != null) { this.defaultServletName = COMMON_DEFAULT_SERVLET_NAME; } + else if (this.servletContext.getNamedDispatcher(GAE_DEFAULT_SERVLET_NAME) != null) { + this.defaultServletName = GAE_DEFAULT_SERVLET_NAME; + } else if (this.servletContext.getNamedDispatcher(RESIN_DEFAULT_SERVLET_NAME) != null) { this.defaultServletName = RESIN_DEFAULT_SERVLET_NAME; }