]> source.dussan.org Git - vaadin-framework.git/commitdiff
Added support PORTLET_CONTEXT for vaadin.resources.path value (#14640)
authorTaras Hupalo <taras.hupalo@gmail.com>
Wed, 24 Sep 2014 09:10:46 +0000 (12:10 +0300)
committerTaras Hupalo <taras.hupalo@gmail.com>
Wed, 24 Sep 2014 11:51:12 +0000 (14:51 +0300)
Change-Id: Ie801a17ed1eff29a7dc6be61755241777071ab8f

server/src/com/vaadin/server/Constants.java
server/src/com/vaadin/server/VaadinPortletService.java

index 2b868c12a6188f2e9205ea5af4349bb25cc955ca..fc0bf7381ab496bcaa81983b9999532fc3ca9bb7 100644 (file)
@@ -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";
 }
index 2b290b4cc4247c69132170da0f7eb75d0d2d7fbb..c6d9b8e46afaba21dd11850aa2b5fc11961f7cde 100644 (file)
@@ -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() {