aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTaras Hupalo <taras.hupalo@gmail.com>2014-09-24 12:10:46 +0300
committerTaras Hupalo <taras.hupalo@gmail.com>2014-09-24 14:51:12 +0300
commit51fef5e8cb39f96dac11f4b3e2d772525d3ebfe6 (patch)
treea69300b79af013eb476e604435473ee88df7b948
parent69df69f494244d6ce6e6c4e32ceea2c75767061f (diff)
downloadvaadin-framework-51fef5e8cb39f96dac11f4b3e2d772525d3ebfe6.tar.gz
vaadin-framework-51fef5e8cb39f96dac11f4b3e2d772525d3ebfe6.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() {