Index: manual/src/main/webapp/users-guide/http.conf =================================================================== --- manual/src/main/webapp/users-guide/http.conf (revision 0) +++ manual/src/main/webapp/users-guide/http.conf (revision 0) @@ -0,0 +1,53 @@ +h1. Pax Web (OSGi HttpService) + +The Karaf http feature enables the Pax Web implementation of the OSGi http service. + +h2. Installing the http feature + +{code} +root@karaf> features:install http +{code} + +Create a file {{etc/org.ops4j.pax.web.cfg}} with the following content: + +{code} +org.osgi.service.http.port=8080 +{code} + +This tells Pax Web to listen to the port 8080. As soon as the http feature is installed and the config file is present the following url will be reachable: + +{code} +http://localhost:8080/ +{code} + +h2. Registering a servlet with the HttpService manually + +See [Apache Felix HTTP Service | http://felix.apache.org/site/apache-felix-http-service.html] + +h2. Using the Pax Web whiteboard extender + +The pax whiteboard extender is part of the war feature so use the following to install: + +{code} +root@karaf> features:install war +{code} + +The [Pax Web Whiteboard|http://wiki.ops4j.org/display/ops4j/Pax+Web+Extender+-+Whiteboard] extender listens to services of interface type HttpServlet and Filter. +It will register each of these instances with the HttpService and remove them as soon as the service goes down. So it is much more convenient than registering with +the HttpService directly. + +{code} + + + + + + + + +{code} + +The above snippet publishes the Servlet MyServlet on http://localhost:8080/myServlet + +Please keep in mind that the Whiteboard pattern for Servlets is not standardized and only works with pax web + Index: manual/src/main/webapp/users-guide/index.conf =================================================================== --- manual/src/main/webapp/users-guide/index.conf (revision 1070831) +++ manual/src/main/webapp/users-guide/index.conf (working copy) @@ -15,6 +15,7 @@ * [Provisioning|provisioning] * [Karaf Archive|kar] * [Configuration|configuration] +* [Pax Web (OSGi HttpService)|/users-guide/http] * [Web applications|/users-guide/web-applications] * [OS integration|/users-guide/wrapper] * [JRE packages tuning|/users-guide/jre-tuning]