Ulf Dittmer wrote:While OSGi can be used to architect a web server or servlet container, there's nothing in it that handles HTTP, so, no, it's not a replacement for that.
Not exactly true. The core OSGi spec doesn't call for any HTTP handling, but the compendium to the spec does describe an HTTP service that can handle basic servlet requests (not much more than that, though). And you have to programmatically register servlets with the HTTP service (eg, no web.xml).
Building on top of the HTTP service is a project called Pax Web. It provides an implementation of OSGi's HTTP service that also supports
JSP, servlet filters, listeners...pretty much everything you'd need. And, it includes an extender that makes it possible to deploy near-standard WAR files (with a tiny bit of extra goodness in the manifest) to OSGi.
Spring-DM also supports servlet-based web development, but in a different way. They lean heavily on either
Tomcat or Jetty to do what they do best, but let you install WAR files as bundles in the OSGi framework. This is my current preferred approach, but I may change my mind as the OSGi R4.2 spec starts taking shape with web bundle support.