brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [1/2] brooklyn-server git commit: Pick up root wars when passed to BrooklynLauncher
Date Sun, 21 Feb 2016 07:32:34 GMT
Repository: brooklyn-server
Updated Branches:
  refs/heads/master e0818af97 -> a6e14b56b


Pick up root wars when passed to BrooklynLauncher

wars passed to BrooklynLauncher get their context path stripped of the leading "/", resulting
in empty string for root apps. The web server expects a "/" context path for a root war so
it uses the default war instead.


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/24060f7b
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/24060f7b
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/24060f7b

Branch: refs/heads/master
Commit: 24060f7babcb56111f496880125a36d413b2963a
Parents: e0818af
Author: Svetoslav Neykov <svetoslav.neykov@cloudsoftcorp.com>
Authored: Sat Feb 20 18:34:11 2016 +0200
Committer: Svetoslav Neykov <svetoslav.neykov@cloudsoftcorp.com>
Committed: Sat Feb 20 18:34:11 2016 +0200

----------------------------------------------------------------------
 .../java/org/apache/brooklyn/launcher/BrooklynWebServer.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/24060f7b/launcher/src/main/java/org/apache/brooklyn/launcher/BrooklynWebServer.java
----------------------------------------------------------------------
diff --git a/launcher/src/main/java/org/apache/brooklyn/launcher/BrooklynWebServer.java b/launcher/src/main/java/org/apache/brooklyn/launcher/BrooklynWebServer.java
index 75e9f3e..8b49ca9 100644
--- a/launcher/src/main/java/org/apache/brooklyn/launcher/BrooklynWebServer.java
+++ b/launcher/src/main/java/org/apache/brooklyn/launcher/BrooklynWebServer.java
@@ -287,7 +287,7 @@ public class BrooklynWebServer {
     /** specifies a WAR to use at a given context path (only if server not yet started);
      * cf deploy(path, url) */
     public BrooklynWebServer addWar(String path, String warUrl) {
-        contextProviders.put(path, new WebAppContextProvider(path, warUrl));
+        addWar(new WebAppContextProvider(path, warUrl));
         return this;
     }
 
@@ -394,7 +394,7 @@ public class BrooklynWebServer {
             allWars.put(entry.getKey(), new WebAppContextProvider(entry.getKey(), entry.getValue()));
         }
 
-        WebAppContextProvider rootWar = allWars.remove("/");
+        WebAppContextProvider rootWar = allWars.remove(""); // leading slash stripped by
WebAppContextProvider
         if (rootWar==null) rootWar = new WebAppContextProvider("/", war);
         
         for (WebAppContextProvider contextProvider : allWars.values()) {


Mime
View raw message