summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTaras Hupalo <taras.hupalo@gmail.com>2014-09-24 12:10:46 +0300
committerSauli Tähkäpää <sauli@vaadin.com>2014-09-24 22:01:18 +0300
commit07ccd65b98d05e45fd54bf000e9292f784d8bfd9 (patch)
treebdd92d05561c4d78b2657fc9566ae20da362aa2a
parent77b1fe7ee1f9f377956f1f88d5e68d9239a4cfa4 (diff)
downloadvaadin-framework-07ccd65b98d05e45fd54bf000e9292f784d8bfd9.tar.gz
vaadin-framework-07ccd65b98d05e45fd54bf000e9292f784d8bfd9.zip
Added support PORTLET_CONTEXT for vaadin.resources.path value (#14640)
Change-Id: Ie801a17ed1eff29a7dc6be61755241777071ab8f
-rw-r--r--server/src/com/vaadin/server/Constants.java2
-rw-r--r--server/src/com/vaadin/server/VaadinPortletService.java6
2 files changed, 7 insertions, 1 deletions
diff --git a/server/src/com/vaadin/server/Constants.java b/server/src/com/vaadin/server/Constants.java
index 2b868c12a6..fc0bf7381a 100644
--- a/server/src/com/vaadin/server/Constants.java
+++ b/server/src/com/vaadin/server/Constants.java
@@ -162,4 +162,6 @@ public interface Constants {
static final String PORTAL_PARAMETER_VAADIN_WIDGETSET = "vaadin.widgetset";
static final String PORTAL_PARAMETER_VAADIN_RESOURCE_PATH = "vaadin.resources.path";
static final String PORTAL_PARAMETER_VAADIN_THEME = "vaadin.theme";
+
+ static final String PORTLET_CONTEXT = "PORTLET_CONTEXT";
}
diff --git a/server/src/com/vaadin/server/VaadinPortletService.java b/server/src/com/vaadin/server/VaadinPortletService.java
index 2b290b4cc4..c6d9b8e46a 100644
--- a/server/src/com/vaadin/server/VaadinPortletService.java
+++ b/server/src/com/vaadin/server/VaadinPortletService.java
@@ -162,7 +162,11 @@ public class VaadinPortletService extends VaadinService {
String staticFileLocation = getParameter(request,
Constants.PORTAL_PARAMETER_VAADIN_RESOURCE_PATH, "/html");
- return trimTrailingSlashes(staticFileLocation);
+ if (Constants.PORTLET_CONTEXT.equals(staticFileLocation)) {
+ return request.getContextPath();
+ } else{
+ return trimTrailingSlashes(staticFileLocation);
+ }
}
private PortletContext getPortletContext() {