Hi, well if you don't have an osgi-war and want to deploy it, you either need to add the Webapp-Context yourself or the deployer does it for you :) if not given, so regarding this you are doing everything right. The war: url-handler is equivalent to webbundle: though webbundle is the official OSGi spec conforming url-handler for non-osgi wars. If you want to deploy a osgi-fied war you just need to install it as install -s file://location/blubb.war or better from a maven repo install -s mvn:groupId/artifactId/version/war. It's that easy. Btw. Karaf uses Pax-Web as sophisticated OSGi Web-Container, which again uses Jetty as serving container. For more information of Pax-Web take a look at [1].
regards, Achim [1] - https://ops4j1.jira.com/wiki/display/paxweb/Pax+Web 2013/5/7 Gražvydas Valeika <[email protected]> > Hi all, > > I'm new to karaf, tried to look at archives but failed to find answer, > sorry if this is kind of faq. > > I'm trying to use same war to deploy multiple instances of web application. > > So far I succeeded to deploy not-OSGi-fied war file into karaf war feature > using 'install webbundle': > > install > webbundle:file:///myApp.war?Bundle-SymbolicName=myApp2&Webapp-Context=/myApp2 > install > webbundle:file:///myApp.war?Bundle-SymbolicName=myApp3&Webapp-Context=/myApp3 > > etc. > > This has annoying requirement to put all possible headers into url > parameters. > > I also noticed on google that command like: > > install war:file:///myApp.war?Webapp-Context=/myApp3 > > is discussed, and, maybe, worked some time ago in I don't know what > version of karaf. > > > Is it possible to use OSGi-fied war in such way - use all preconfigured > MANIFEST.MF headers and override only some of them in install url > parameters? > > in http://wiki.eclipse.org/Jetty/Feature/Jetty_OSGi#.22war.22_URL_scheme I > found > > 'The support for this protocol is mostly complete. The query string > parameters that enable overriding the manifest headers and other settings > have not been extensively tested.' > > I'm doing it wrong way, or this feature is not supported? > > > Best regards, > Grazvydas > -- Apache Karaf <http://karaf.apache.org/> Committer & PMC OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead OPS4J Pax for Vaadin <http://team.ops4j.org/wiki/display/PAXVAADIN/Home> Commiter & Project Lead blog <http://notizblog.nierbeck.de/>
