This seems to be the most promising approach. Repackage the WAB as a WAR then deploy it at runtime as shown below. The URL parameters will assist the OSGI Web URL Handler in automagically producing a WAB + MANIFEST.MF with the correct web-contextpath header. Only I need to do it using the bundleContext.installBundle(String location) API instead of in the console. I also need to sort out the URL of the built war itself. Does this sound correct?
karaf@root()> bundle:install -s "webbundle:http://tomcat.apache.org/tomcat-7.0-doc/appdev/sample/sample.war?Bundle-SymbolicName=tomcat-sample&Web-ContextPath=/sample"
From <https://karaf.apache.org/manual/latest/webcontainer>
https://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.war.html#i3100445
--
--
------------------
OPS4J - http://www.ops4j.org - op...@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ops4j+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ops4j/2e75aacf-be77-4753-a05c-126df2b7f487n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ops4j/CADGfNtp_02pRaMrG7Oj0wJuYKA3O3p0QS6DHa3XSChA0qJNUFA%40mail.gmail.com.
osgi.http.whiteboard.context.name | my-context |
osgi.http.whiteboard.context.path | /test |
service.bundleid | 56 |
service.scope | singleton |
[Object]
|
To view this discussion on the web visit https://groups.google.com/d/msgid/ops4j/CAAdXmhpzREW99MVkkyXxg8Bt8Owsyp-iYY26n%2BeiG3F4BEn_eg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ops4j/CADGfNtqNM-x5B0XTrK2Vgo%2BdDwsB7erxhgVqKC7KrAth%2B%2BaesA%40mail.gmail.com.