diff --git a/itest/web/pom.xml b/itest/web/pom.xml
index 57165655c1..390b978f34 100644
--- a/itest/web/pom.xml
+++ b/itest/web/pom.xml
@@ -24,6 +24,10 @@
I'm file?with?special?chars.html
- - diff --git a/itest/web/src/test/java/org/springframework/security/integration/AbstractWebServerIntegrationTests.java b/itest/web/src/test/java/org/springframework/security/integration/AbstractWebServerIntegrationTests.java index 5294ae8e1e..ec420d866b 100644 --- a/itest/web/src/test/java/org/springframework/security/integration/AbstractWebServerIntegrationTests.java +++ b/itest/web/src/test/java/org/springframework/security/integration/AbstractWebServerIntegrationTests.java @@ -3,11 +3,13 @@ package org.springframework.security.integration; import org.springframework.web.context.ContextLoaderListener; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.support.WebApplicationContextUtils; +import org.springframework.web.servlet.DispatcherServlet; import org.springframework.util.StringUtils; import net.sourceforge.jwebunit.WebTester; import org.mortbay.jetty.Server; +import org.mortbay.jetty.servlet.ServletHolder; import org.mortbay.jetty.webapp.WebAppContext; import javax.servlet.ServletContext; @@ -64,6 +66,11 @@ public abstract class AbstractWebServerIntegrationTests { webCtx.getInitParams().put("contextConfigLocation", getContextConfigLocations()); } + ServletHolder servlet = new ServletHolder(); + servlet.setName("testapp"); + servlet.setClassName(DispatcherServlet.class.getName()); + webCtx.addServlet(servlet, "*.htm"); + return webCtx; } diff --git a/itest/web/src/test/java/org/springframework/security/integration/InMemoryProviderWebAppTests.java b/itest/web/src/test/java/org/springframework/security/integration/InMemoryProviderWebAppTests.java index d208805940..b2b5e76212 100644 --- a/itest/web/src/test/java/org/springframework/security/integration/InMemoryProviderWebAppTests.java +++ b/itest/web/src/test/java/org/springframework/security/integration/InMemoryProviderWebAppTests.java @@ -42,9 +42,9 @@ public class InMemoryProviderWebAppTests extends AbstractWebServerIntegrationTes // SEC-1255 @Test public void redirectToUrlWithSpecialCharsInFilenameWorksOk() throws Exception { - beginAt("secure/file%3Fwith%3Fspecial%3Fchars.html?someArg=1"); + beginAt("secure/file%3Fwith%3Fspecial%3Fchars.htm?someArg=1"); login("jimi", "jimispassword"); - assertTextPresent("I'm file?with?special?chars.html"); + assertTextPresent("I'm file?with?special?chars.htm"); } }