Hi Scott,

first of all, it's recommended to also subscribe to the mailinglist,
otherwise we're not able to see those messages,
cause most of us do read the mailinglist and not look at the nabble "forum"
:)

Besides that, the solution Gareth just pointed out is one of the best I
heard so far ;)
Another one, a bit more hacky is to register the HttpContext of your
application as a service
and use this HttpContext with all your Servlet containing bundles, but this
will only work with
Either using the WebContainer Interface or the Whiteboard-Extender.

regards, Achim




2014-04-25 5:56 GMT+02:00 Gareth <[email protected]>:

> Hello Scott,
>
> There are other ways to do this in OSGi/Karaf. But to use these other
> methods you need to use the http service or the pax web implementation of
> the whiteboard pattern to register servlet contexts/servlets/filters etc.
>
> One way to implement your requirement would be to create one bundle to
> manage the registering of resources with pax web.
>
> Each Servlet implementation bundle could have a special manifest
> flag/special file which identifies it as part of the application. The main
> bundle would then be a bundle listener which looks for this special
> file/manifest flag and when it finds it it looks inside the bundle and
> registers relevant resources with pax web under the main servlet context. I
> do this already and it works well for me.
>
> Let me know if this answers your question.
>
> regards,
> Gareth
>
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/WABs-and-Web-ContextPath-tp4032881p4032948.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 

Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>

Software Architect / Project Manager / Scrum Master

Reply via email to