diff options
Diffstat (limited to 'uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java')
-rw-r--r-- | uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java | 51 |
1 files changed, 2 insertions, 49 deletions
diff --git a/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java b/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java index 12d1cb2c38..0c2a1f965a 100644 --- a/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java +++ b/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java @@ -30,7 +30,6 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.vaadin.LegacyApplication; -import com.vaadin.server.DeploymentConfiguration; import com.vaadin.server.LegacyVaadinServlet; import com.vaadin.server.ServiceException; import com.vaadin.server.SessionInitEvent; @@ -40,7 +39,6 @@ import com.vaadin.server.UIProvider; import com.vaadin.server.VaadinRequest; import com.vaadin.server.VaadinServiceSession; import com.vaadin.server.VaadinServletRequest; -import com.vaadin.server.VaadinServletService; import com.vaadin.tests.components.TestBase; import com.vaadin.ui.UI; @@ -174,8 +172,9 @@ public class ApplicationRunnerServlet extends LegacyVaadinServlet { return getApplicationRunnerURIs(request).applicationClassname; } + // TODO Don't need to use a data object now that there's only one field private static class URIS { - String staticFilesPath; + // String staticFilesPath; // String applicationURI; // String context; // String runner; @@ -201,21 +200,18 @@ public class ApplicationRunnerServlet extends LegacyVaadinServlet { private static URIS getApplicationRunnerURIs(HttpServletRequest request) { final String[] urlParts = request.getRequestURI().toString() .split("\\/"); - String context = null; // String runner = null; URIS uris = new URIS(); String applicationClassname = null; String contextPath = request.getContextPath(); if (urlParts[1].equals(contextPath.replaceAll("\\/", ""))) { // class name comes after web context and runner application - context = urlParts[1]; // runner = urlParts[2]; if (urlParts.length == 3) { throw new IllegalArgumentException("No application specified"); } applicationClassname = urlParts[3]; - uris.staticFilesPath = "/" + context; // uris.applicationURI = "/" + context + "/" + runner + "/" // + applicationClassname; // uris.context = context; @@ -223,14 +219,12 @@ public class ApplicationRunnerServlet extends LegacyVaadinServlet { uris.applicationClassname = applicationClassname; } else { // no context - context = ""; // runner = urlParts[1]; if (urlParts.length == 2) { throw new IllegalArgumentException("No application specified"); } applicationClassname = urlParts[2]; - uris.staticFilesPath = "/"; // uris.applicationURI = "/" + runner + "/" + applicationClassname; // uris.context = context; // uris.runner = runner; @@ -274,47 +268,6 @@ public class ApplicationRunnerServlet extends LegacyVaadinServlet { throw new ClassNotFoundException(); } - @Override - protected String getRequestPathInfo(HttpServletRequest request) { - String path = request.getPathInfo(); - if (path == null) { - return null; - } - - path = path.substring(1 + getApplicationRunnerApplicationClassName( - request).length()); - return path; - } - - @Override - protected VaadinServletService createServletService( - DeploymentConfiguration deploymentConfiguration) { - return new VaadinServletService(this, deploymentConfiguration) { - @Override - public String getStaticFileLocation(VaadinRequest request) { - URIS uris = getApplicationRunnerURIs(VaadinServletRequest - .cast(request)); - String staticFilesPath = uris.staticFilesPath; - if (staticFilesPath.equals("/")) { - staticFilesPath = ""; - } - - return staticFilesPath; - } - }; - } - - @Override - protected VaadinServletRequest createVaadinRequest( - HttpServletRequest request) { - return new VaadinServletRequest(request, getService()) { - @Override - public String getRequestPathInfo() { - return ApplicationRunnerServlet.this.getRequestPathInfo(this); - } - }; - } - private Logger getLogger() { return Logger.getLogger(ApplicationRunnerServlet.class.getName()); } |