Unfortunately there is no standard way to change the context path of your WAB dynamically after the bundle has been installed.
 

Tom
 
 
----- Original message -----
From: Peter Kullmann <p.kullm...@arenae.ch>
Sent by: osgi-dev-boun...@mail.osgi.org
To: osgi-dev@mail.osgi.org
Cc:
Subject: [osgi-dev] Configure Web-ContextPath
Date: Thu, Aug 18, 2016 4:02 AM
 
In one of our apps we want to configure the context path of a web application bundle. I only know of two ways to specify the context path: One is the manifest header "Web-ContextPath“ and the other is to use a „webbundle:…?Web-ContextPath=...“ URL to install the bundle. I would like to be able to set a system property with the context path (or better using configuration admin). My current solution goes along these ways:

       wabBundle.uninstall();
       Bundle newWabBundle = bc.installBundle("webbundle:" + embeddedUrl
               + "?Web-ContextPath=" + contextPath);
       newWabBundle.start();

but that seems clumsy and prolongs startup time. I’m sure there must be a way that is more elegant and efficient than this. Any ideas are greatly appreciated.

Thanks
Peter

_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev
 

_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to