diff options
author | Leif Åstrand <leif@vaadin.com> | 2012-09-04 10:10:21 +0300 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2012-09-04 10:46:45 +0300 |
commit | f4d93126ca75631702a2086d770d068d8c13d547 (patch) | |
tree | 2a666680effdc3b013d02ae4edf2d43efa3e759a /uitest | |
parent | ebe75aa2b803db493fd8daab5b4e90f33e2e39d5 (diff) | |
download | vaadin-framework-f4d93126ca75631702a2086d770d068d8c13d547.tar.gz vaadin-framework-f4d93126ca75631702a2086d770d068d8c13d547.zip |
Make DeploymentConfiguration configurable (#9402)
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java b/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java index bbe6e061fb..11685033a9 100644 --- a/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java +++ b/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java @@ -21,6 +21,7 @@ import java.net.MalformedURLException; import java.net.URL; import java.util.Collections; import java.util.LinkedHashSet; +import java.util.Properties; import java.util.logging.Level; import java.util.logging.Logger; @@ -30,8 +31,8 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.vaadin.Application; -import com.vaadin.server.VaadinServlet; import com.vaadin.server.AbstractUIProvider; +import com.vaadin.server.VaadinServlet; import com.vaadin.server.WrappedHttpServletRequest; import com.vaadin.server.WrappedRequest; import com.vaadin.tests.components.TestBase; @@ -257,14 +258,21 @@ public class ApplicationRunnerServlet extends VaadinServlet { } @Override - protected String getStaticFilesLocation(HttpServletRequest request) { - URIS uris = getApplicationRunnerURIs(request); - String staticFilesPath = uris.staticFilesPath; - if (staticFilesPath.equals("/")) { - staticFilesPath = ""; - } + protected ServletDeploymentConfiguration createDeploymentConfiguration( + Properties applicationProperties) { + return new ServletDeploymentConfiguration(this, applicationProperties) { + @Override + public String getStaticFileLocation(WrappedRequest request) { + URIS uris = getApplicationRunnerURIs(WrappedHttpServletRequest + .cast(request)); + String staticFilesPath = uris.staticFilesPath; + if (staticFilesPath.equals("/")) { + staticFilesPath = ""; + } - return staticFilesPath; + return staticFilesPath; + } + }; } @Override |