Apache Felix Lightweight HTTP Service

This is a minimal implementation of the HTTP Service Specification as described in chapter 102 of the OSGi Compendium. The goal is to provide a basic HTTP Service for resource-constrained devices and other use cases where the standard HTTP Service may be overkill. The bundle requires Java 1.4 or above and implements the Servlet 2.4 API.

Targets

The Apache Felix Lightweight HTTP Service comes in two targets: core and complete. Core provides the minimal server functionality and requires the HTTP Servlet and OSGi HTTP Service APIs to be provided by other bundles at runtime. The complete bundle packages these as well and has no external dependencies. Currently the complete bundle is about 2x the size of core (55Kb vs 98Kb). If space is a concern and the API packages are already provided by other bundles in your environment, the core target makes the most sense. However for easy installation and maintenance, the complete bundle may be the better choice.

Configuration Properties

The service can only be configured using OSGi environment properties. The service supports a subset of the standard HTTP Service properties:

  • org.osgi.service.http.port - The port used for servlets and resources available via HTTP. The default is 8080.
  • org.apache.felix.http.enable - Enable or disable the HTTP protocol. The default is enabled.
  • org.apache.felix.https.enable - Enable or disable the HTTPS protocol. Currently the lightweight HTTP Service does not support HTTPS, and setting this to true will only result in a log warning.
  • felix.log.level - The log level for messages originating from the bundle. The default is 1.
  • No labels