Browse Source

SPR-7553 - DefaultServletHttpRequestHandler fails on Google App Engine

pull/1234/head
Jeremy Grelle 14 years ago
parent
commit
334a294e2a
  1. 6
      org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/resource/DefaultServletHttpRequestHandler.java

6
org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/resource/DefaultServletHttpRequestHandler.java

@ -52,6 +52,9 @@ public class DefaultServletHttpRequestHandler implements HttpRequestHandler, Ser @@ -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 @@ -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;
}

Loading…
Cancel
Save