To support the "traditional" (aka legacy) web.xml for deploying webapp, you will need to implement the OSGi Web Applications specification, which is part of the OSGi R4.2 Enterprise specification. This will allow you to deploy Web Application Packages (WABs) or even old, old WAR files.
There are implementations of this container in the Eclipse Gemini and Apache Aries projects. Note that the Gemini found in Eclipse is also found in Eclipse Virgo (new name for the dm server). You may find that using Virgo will give you a cleaner “out of the box” experience, rather than assembling the components yourself. And again, I fully understand if it also provides much more than you really want!
An alternative is to switch from web.xml and programmatically start servlets with OSGi HttpService . This should be much easier, but I don’t know if it will work for “Spring bootstrap” - a rather vague requirement.
source share