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

Reply via email to