Jetty Logo
Version: 9.2.3.v20140905
Contact the core Jetty developers at www.webtide.com

private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services from 1 day to full product delivery

OSGI

Introduction
General Setup
The Jetty OSGi Container
Deploying Bundles as Webapps
Deploying Bundles as Jetty ContextHandlers
Deploying Services as Webapps
Deploying Services as ContextHandlers
Support for the OSGi Service Platform Enterprise Specification
Using JSPs
Using Annotations/ServletContainerInitializers
Felix

Introduction

The Jetty OSGi infrastructure provides a Jetty container inside an OSGi container. Traditional JavaEE webapps can be deployed, in addition to Jetty ContextHandlers, along with OSGi web bundles. In addition, the infrastructure also supports the OSGi HttpService interface.

General Setup

All of the Jetty jars contain manifest entries appropriate to ensure that they can be deployed into an OSGi container as bundles. You will need to install some jetty jars into your OSGi container. You can always find the jetty jars either in the maven central repository, or you can download a distribution of jetty. Here's the minimal set:

Table 27.1. Bundle Name Mapping

JarBundle Symbolic Name
jetty-utilorg.eclipse.jetty.util
jetty-httporg.eclipse.jetty.http
jetty-ioorg.eclipse.jetty.io
jetty-securityorg.eclipse.jetty.security
jetty-serverorg.eclipse.jetty.server
jetty-servletorg.eclipse.jetty.servlet
jetty-webapporg.eclipse.jetty.webapp
jetty-deployorg.eclipse.jetty.deploy
jetty-xmlorg.eclipse.jetty.xml
jetty-osgi-servlet-apiorg.eclipse.jetty.toolchain

Note

We recommend that you also deploy the annotation-related jars also, as increasingly the Servlet Specification relies on annotations for functionality.

The Jetty OSGi Container

The jetty-osgi-boot jar

Now that you have the basic set of Jetty jars installed, you can install the jetty-osgi-boot.jar bundle, downloadable from the maven central repo here.

This bundle will instantiate and make available the Jetty OSGi container when it is started. If this bundle is not auto-started upon installation into your OSGi container, you should start it manually using a command appropriate for your container.

Customizing the Jetty Container

Before going ahead with the install, you may want to customize the Jetty container. In general this is done by a combination of System properties and the usual jetty xml configuration files. The way you define the System properties will depend on which OSGi container you are using, so ensure that you are familiar with how to set them for your environment. In the following examples, we will assume that the OSGi container allows us to set System properties as simple name=value pairs.

The available System properties are:

jetty.port

If not specified, this defaults to the usual jetty port of 8080.

jetty.home

Either this property or the jetty.home.bundle must be specified. This property should point to a file system location that has an etc/ directory containing xml files to configure the Jetty container on startup. For example:

Where /opt/custom/jetty contains:

jetty.home.bundle

Either this property or the jetty.home property must be specified. This property should specify the symbolic name of a bundle which contains a directory called jettyhome/. The jettyhome/ directory should have a subdirectory called etc/ that contains the xml files to be applied to Jetty on startup. The jetty-osgi-boot.jar contains a jettyhome/ directory with a default set of xml configuration files. Here's how you would specify it:

Here's a partial listing of that jar that shows you the names of the xml files contained within it:

jetty.etc.config.urls

This specifies the paths of the xml files that are to be used. If not specified, they default to:

Note that the paths can either be relative or absolute, or a mixture. If the path is relative, it is resolved against either jetty.home or jetty.home.bundle, whichever was specified. You can use this ability to mix and match jetty configuration files to add functionality, such as adding in a https connector. Here's an example of adding a https connector, using the relevant files from the jetty-distribution:

Note that regardless of whether you set the jetty.home or jetty.home.bundle property, when Jetty executes the configuration files, it will set an appropriate value for jetty.home so that references in xml files to <property name="jetty.home"> will work. Be careful, however, if you are mixing and matching relative and absolute configuration file paths: the value of jetty.home is determined from the resolved location of the relative files only.

The Jetty Container as an OSGi Service

You can now go ahead and deploy the jetty-osgi-boot.jar into your OSGi container. A Jetty Server instance will be created, the xml config files applied to it, and then published as an OSGi service. Normally, you will not need to interact with this service instance, however you can retrieve a reference to it using the usual OSGi API:

The Server service has a couple of properties associated with it that you can retrieve using the org.osgi.framework.ServiceReference.getProperty(String) method:

managedServerName

The Jetty Server instance created by the jetty-osgi-boot.jar will be called "defaultJettyServer"

jetty.etc.config.urls

The list of xml files resolved from either jetty.home or jetty.home.bundle/jettyhome

Adding More Jetty Servers

As we have seen in the previous section, the jetty-osgi-boot code will create an org.eclipse.jetty.server.Server instance, apply the xml configuration files specified by jetty.etc.config.urls System property to it, and then register it as an OSGi Service. The name associated with this default instance is "defaultJettyServer".

You can create other Server instances, register them as OSGi Services, and the jetty-osgi-boot code will notice them, and configure them so that they can deploy ContextHandlers and webapp bundles. When you deploy webapps or ContextHandlers as bundles or Services (see sections below) you can target them to be deployed to a particular server instance via the Server's name.

Here's an example of how to create a new Server instance and register it with OSGi so that the jetty-osgi-boot code will find it and configure it so it can be a deployment target:

Now that we have created a new Server called "fooServer", we can deploy webapps and ContextHandlers as Bundles or Services to it (see below for more information on this). Here's an example of deploying a webapp as a Service and targetting it to the "fooServer" Server we created above:

Deploying Bundles as Webapps

The Jetty OSGi container listens for the installation of bundles, and will automatically attempt to deploy any that appear to be webapps.

Any of the following criteria are sufficient for Jetty to deploy the bundle as a webapp:

Bundle contains a WEB-INF/web.xml file

If the bundle contains a web descriptor, then it is automatically deployed. This is an easy way to deploy classic JavaEE webapps.

Bundle MANIFEST contains Jetty-WarFolderPath or Jetty-WarResourcePath

This is the location within the bundle of the webapp resources. Typically this would be used if the bundle is not a pure webapp, but rather the webapp is a component of the bundle. Here's an example of a bundle where the resources of the webapp are not located at the root of the bundle, but rather inside the subdirectory web/ :

MANIFEST:

Bundle contents:

Bundle MANIFEST contains Web-ContextPath

This header can be used in conjunction with either of the two preceding headers to control the context path to which the webapp is deployed, or alone to identify that the bundle's contents should be published as a webapp. This header is part of the RFC-66 specification for using webapps with OSGi. Here's an eample based on the previous one where we use the Web-ContextPath header to set its deployment context path to be "/sample" :

MANIFEST:

You can also define extra headers in your bundle MANIFEST that help customize the web app to be deployed:

Jetty-defaultWebXmlFilePath

The location of a webdefault.xml file to apply to the webapp. The location can be either absolute (either absolute path or file: url), or relative (in which case it is interpreted as relative to the bundle root). Defaults to the webdefault.xml file built into the Jetty OSGi container.

Jetty-WebXmlFilePath

The location of the web.xml file. The location can be either absolute (either absolute path or file: url), or relative (in which case it is interpreted as relative to the bundle root). Defaults to WEB-INF/web.xml

Jetty-extraClassPath

A classpath of additional items to add to the webapp's classloader.

Jetty-bundleInstall

The path to the base folder that overrides the computed bundle installation - mostly useful for those OSGi frameworks that unpack bundles by default.

Require-TldBundle

A comma separated list of bundle symbolic names of bundles containing TLDs that this webapp depends upon.

managedServerName

The name of the Server instance to which to deploy this webapp bundle. If not specified, defaults to the default Server instance called "defaultJettyServer".

Jetty-WarFragmentResourcePath

The path within a fragment hosted by the web-bundle that contains static resources for the webapp. The path is appended to the base resource for the webapp (see Jetty-WarResourcePath).

Jetty-WarPrependFragmentResourcePath

The path within a fragment hosted by the web-bundle that contains static resources for the webapp.The path is prepended to the base resource for the webapp (see Jetty-WarResourcePath).

Jetty-ContextFilePath

A comma separated list of paths within the webapp bundle to Jetty context files that will be applied to the webapp. Alternatively you may include a single Jetty context file called "jetty-webapp-context.xml" in the webapp bundle's META-INF directory and it will be automatically applied to the webapp.

Determining the Context Path for a Webapp Bundle

As we have seen in the previous section, if the bundle MANIFEST contains the RFC-66 header Web-ContextPath, Jetty will use that as the context path. If the MANIFEST does not contain that header, then Jetty will concoct a context path based on the last element of the bundle's location (by calling Bundle.getLocation()) after stripping off any file extensions.

For example, suppose we have a bundle whose location is:

The corresponding synthesized context path would be:

Extra Properties Available for Webapp Bundles

You can further customize your webapp by including a jetty context xml file that is applied to the webapp. This xml file must be placed in META-INF of the bundle, and must be called jetty-webapp-context.xml.

Here's an example of a webapp bundle listing containing such a file:

Here's an example of the contents of a META-INF/jetty-webapp-context.xml file:

As you can see, it is a normal context xml file used to set up a webapp. There are, however, some additional useful properties that can be referenced

Server

This is a reference to the Jetty org.eclipse.jetty.server.Server instance to which the webapp being configured in the context xml file will be deployed.

bundle.root

This is a reference to the org.eclipse.jetty.util.resource.Resource that represents the location of the Bundle. Note that this could be either a directory in the file system if the OSGi container automatically unpacks bundles, or it may be a jar:file: url if the bundle remains packed.

Deploying Bundles as Jetty ContextHandlers

In addition to deploying webapps, the Jetty OSGi container listens for the installation of bundles that are not heavyweight webapps, but rather use the flexible Jetty-specific concept of ContextHandlers.

The following is the criteria used to decide if a bundle can be deployed as a ContextHandler:

Bundle MANIFEST contains Jetty-ContextFilePath

A comma separated list of names of context files - each one of which represents a ContextHandler that should be deployed by Jetty. The context files can be inside the bundle, external to the bundle somewhere on the file system, or external to the bundle in the jetty.home directory.

A context file that is inside the bundle:

A context file that is on the file system:

A context file that is relative to jetty.home:

A number of different context files:

Other MANIFEST properties that can be used to configure the deployment of the ContextHandler:

managedServerName

The name of the Server instance to which to deploy this webapp bundle. If not specified, defaults to the default Server instance called "defaultJettyServer".

Determining the Context Path for a ContextHandler Bundle

Usually, the context path for the ContextHandler will be set by the context xml file. However, you can override any path set in the context xml file by using the Web-ContextPath header in the MANIFEST.

Extra Properties Available for Context Xml Files

Before the Jetty OSGi container applies a context xml file found in a Jetty-ContextFilePath MANIFEST header, it sets a few useful properties that can be referred to within the xml file:

Server

This is a reference to the Jetty org.eclipse.jetty.server.Server instance to which the ContextHandler being configured in the context xml file will be deployed.

bundle.root

This is a reference to the org.eclipse.jetty.util.resource.Resource that represents the location of the Bundle (obtained by calling Bundle.getLocation()). Note that this could be either a directory in the file system if the OSGi container automatically unpacks bundles, or it may be a jar:file: url if the bundle remains packed.

Here's an example of a context xml file that makes use of these properties:

Deploying Services as Webapps

In addition to listening for bundles whose format or MANIFEST entries define a webapp or ContextHandler for to be deployed, the Jetty OSGi container also listens for the registration of OSGi services that are instances of org.eclipse.jetty.webapp.WebAppContext. So you may programmatically create a WebAppContext, register it as a service, and have Jetty pick it up and deploy it.

Here's an example of doing that with a simple bundle that serves static content, and an org.osgi.framework.BundleActivator that instantiates the WebAppContext:

The bundle contents:

The MANIFEST.MF:

The Activator code:

The above setup is sufficient for Jetty to recognize and deploy the WebAppContext at /acme.

As the example shows, you can use OSGi Service properties in order to communicate extra configuration information to Jetty:

Jetty-WarResourcePath

The location within the bundle of the root of the static resources for the webapp

Web-ContextPath

The context path at which to deploy the webapp.

Jetty-defaultWebXmlFilePath

The location within the bundle of a webdefault.xml file to apply to the webapp. Defaults to that of the Jetty OSGi container.

Jetty-WebXmlFilePath

The location within the bundle of the web.xml file. Defaults to WEB-INF/web.xml

Jetty-extraClassPath

A classpath of additional items to add to the webapp's classloader.

Jetty-bundleInstall

The path to the base folder that overrides the computed bundle installation - mostly useful for those OSGi frameworks that unpack bundles by default.

Require-TldBundle

A comma separated list of bundle symbolic names of bundles containing TLDs that this webapp depends upon.

managedServerName

The name of the Server instance to which to deploy this webapp. If not specified, defaults to the default Server instance called "defaultJettyServer".

Jetty-WarFragmentResourcePath

The path within a fragment hosted by the web-bundle that contains static resources for the webapp. The path is appended to the base resource for the webapp (see Jetty-WarResourcePath).

Jetty-WarPrependFragmentResourcePath

The path within a fragment hosted by the web-bundle that contains static resources for the webapp.The path is prepended to the base resource for the webapp (see Jetty-WarResourcePath).

Deploying Services as ContextHandlers

Similarly to WebAppContexts, the Jetty OSGi container can detect the registration of an OSGi Service that represents a ContextHandler and ensure that it is deployed. The ContextHandler can either be fully configured before it is registered as an OSGi service - in which case the Jetty OSGi container will merely deploy it - or the ContextHandler can be partially configured, with the Jetty OSGi container completing the configuration via a context xml file and properties associated with the Service.

Here's an example of doing that with a simple bundle that serves static content with an org.osgi.framework.BundleActivator that instantiates a ContextHandler and registers it as an OSGi Service, passing in properties that define a context xml file and context path for Jetty to apply upon deployment:

The bundle contents:

The MANIFEST:

The Activator code:

The contents of the acme.xml context file:

You may also use the following OSGi Service properties:

managedServerName

The name of the Server instance to which to deploy this webapp. If not specified, defaults to the default Server instance called "defaultJettyServer".

Extra Properties Available for Context Xml Files

Before the Jetty OSGi container applies a context xml file found in a Jetty-ContextFilePath property, it sets a few useful properties that can be referred to within the xml file:

Server

This is a reference to the Jetty org.eclipse.jetty.server.Server instance to which the ContextHandler being configured in the context xml file will be deployed.

bundle.root

This is a reference to the org.eclipse.jetty.util.resource.Resource that represents the location of the Bundle publishing the ContextHandler as a Service(obtained by calling Bundle.getLocation()). Note that this could be either a directory in the file system if the OSGi container automatically unpacks bundles, or it may be a jar:file: url if the bundle remains packed.

In the example above, you can see both of these properties being used in the context xml file.

Support for the OSGi Service Platform Enterprise Specification

The Jetty OSGi container implements several aspects of the Enterprise Specification v4.2 for the WebAppContexts and ContextHandlers that it deploys from either bundles or OSGi services as outlined in foregoing sections.

Context Attributes

For each WebAppContext or ContextHandler, the following context attribute is set, as required by section 128.6.1 Bundle Context pg 427:

osgi-bundleContext

The value of this attribute is the BundleContext representing the Bundle associated with the WebAppContext or ContextHandler.

Service Attributes

As required by the specification section 128.3.4 Publishing the Servlet Context pg 421, each WebAppContext and ContextHandler deployed by the Jetty OSGi container is also published as an OSGi service (unless it has been already - see sections 1.6 and 1.7). The following properties are associated with these services:

osgi.web.symbolicname

The symbolic name of the Bundle associated with the WebAppContext or ContextHandler

osgi.web.version

The Bundle-Version header from the Bundle associated with the WebAppContext or ContextHandler

osgi.web.contextpath

The context path of the WebAppContext or ContextHandler

OSGi Events

As required by the specification section 128.5 Events pg 426, the following OSGi Event Admin events will be posted:

org/osgi/service/web/DEPLOYING

The Jetty OSGi container is about to deploy a WebAppContext or ContextHandler

org/osgi/service/web/DEPLOYED

The Jetty OSGi container has finished deploying a WebAppContext or ContextHandler and it is in service

org/osgi/service/web/UNDEPLOYING

The Jetty OSGi container is about to undeploy a WebAppContext or ContextHandler

org/osgi/service/web/UNDEPLOYED

The Jetty OSGi container has finished undeploying a WebAppContext or ContextHandler and it is no longer in service

org/osgi/service/web/FAILED

The Jetty OSGi container failed to deploy a WebAppContext or ContextHandler

Using JSPs

Setup

In order to use JSPs with your webapps and bundles you will need to install the JSP and JSTL jars and their dependencies into your OSGi container. Some you will find in the Jetty distribution, whereas others you will need to download from maven central. Here is the list of recommended jars (NOTE the version numbers may change in future):

Table 27.2. Jars Required for JSP

JarBundle Symbolic NameLocation
The annotation jars  
org.mortbay.jasper:apache-elorg.mortbay.jasper.apache-elDistribution lib/apache-jsp
org.mortbay.jasper:apache-jsporg.mortbay.jasper.apache-jspDistribution lib/apache-jsp
org.eclipse.jetty:apache-jsporg.eclipse.jetty.apache-jspDistribution lib/apache-jsp
org.eclipse.jdt.core-3.8.2.v20130121.jarorg.eclipse.jdt.core.compiler.batchDistribution lib/apache-jsp
org.eclipse.jetty.orbit:javax.servlet.jsp.jstl-1.2.0.v201105211821.jarjavax.servlet.jsp.jstlDistribution lib/jsp
org.glassfish.web:javax.servlet.jsp.jstl-1.2.2.jarorg.glassfish.web.javax.servlet.jsp.jstlDistribution lib/jsp
org.eclipse.jetty.osgi:jetty-osgi-boot-jsporg.eclipse.jetty.osgi.boot.jspMaven central

Note

  1. As of jetty-9.2.3 the jetty-osgi-boot-jsp bundle changed to using Apache Jasper as the JSP implementation. Prior to this the Glassfish Jasper implementation was used, which had a different set of dependencies - pay careful attention to the jars listed both at the top of this page and in this section, as deployment of other jars can cause incomplete or incorrect package resolution in the OSGi container.

  2. The order of deployment is important. Deploy these bundles in the order shown or you may experience strange failures in the compilation of jsps. This can be hard to diagnose but is almost always caused by the ServletContainerInitializer in the org.eclipse.jetty.apache-jsp bundle for the jsp container not being invoked due to incorrect startup of the annotation jars.

The jetty-osgi-boot-jsp jar

To be able to use JSPs you will need to also install the jetty-osgi-boot-jsp.jar into your OSGi container. This jar can be obtained from maven central here.

This bundle acts as a fragment extension to the jetty-osgi-boot.jar and adds in support for using JSP.

Using TagLibs

The Jetty JSP OSGi container will make available the JSTL tag library to all webapps. If you only use this tag library, then your webapp will work without any further modification.

However, if you make use of other taglibs, you will need to ensure that they are installed into the OSGi container, and also define some System properties and/or MANIFEST headers in your webapp. This is necessary because the classloading regime used by the OSGi container is very different than that used by JSP containers, and the MANIFEST of a normal webapp does not contain enough information for the OSGi environment to allow a JSP container to find and resolve TLDs referenced in the webapp's .jsp files.

Firstly, lets look at an example of a web bundle's modified MANIFEST file so you get an idea of what is required. This example is a web bundle that uses the Spring servlet framework:

The Require-TldBundle header tells the Jetty OSGi container that this bundle contains TLDs that need to be passed over to the JSP container for processing. The Import-Bundle header ensures that the implementation classes for these TLDs will be available to the webapp on the OSGi classpath.

The format of the Require-TldBundle header is a comma separated list of one or more symbolic names of bundles containing TLDs.

Container Path Taglibs

Some TLD jars are required to be found on the Jetty OSGi container's classpath, rather than considered part of the web bundle's classpath. For example, this is true of JSTL and Java Server Faces. The Jetty OSGi container takes care of JSTL for you, but you can control which other jars are considered as part of the container's classpath by using the System property org.eclipse.jetty.osgi.tldbundles:

org.eclipse.jetty.osgi.tldbundles

System property defined on the OSGi environment that is a comma separated list of symbolic names of bundles containing taglibs that will be treated as if they are on the container's classpath for web bundles. For example:

You will still need to define the Import-Bundle header in the MANIFEST file for the web bundle to ensure that the TLD bundles are on the OSGi classpath.

Alternatively or additionally, you can define a pattern as a context attribute that will match symbolic bundle names in the OSGi environment containing TLDs that should be considered as discovered from the container's classpath.

org.eclipse.jetty.server.webapp.containerIncludeBundlePattern

This pattern must be specified as a context attribute of the WebAppContext representing the web bundle. Unless you are deploying your own WebAppContext (see Deploying Services as Webapps), you won't have a reference to the WebAppContext to do this. In that case, it can be specified on the org.eclipse.jetty.deploy.DeploymentManager, where it will be applied to every webapp deployed by the Jetty OSGi container. The jetty-osgi-boot.jar contains the default jettyhome/etc/jetty-deploy.xml file where the DeploymentManager is defined. To set the pattern, you will need to provide your own etc files - see the section on customizing the jetty container for how to do this. Here's how the jetty-deploy.xml file would look if we defined a pattern that matched all bundle symbolic names ending in "tag" and "web":

Again, you will still need to define suitable Import-Bundle headers in your web bundle MANIFEST to ensure that bundles matching the pattern are available on the OSGi class path.

Using Annotations/ServletContainerInitializers

Annotations are very much part of the Servlet 3.0 and 3.1 specifications. In order to use them with Jetty in OSGi, you will need to deploy some extra jars into your OSGi container:

Table 27.3. Jars Required for Annotations

JarBundle Symbolic NameLocation
org.ow2.asm:asm-5.0.1.jarorg.objectweb.asmMaven central
org.ow2.asm:asm-commons-5.0.1.jarorg.objectweb.asm.commonsMaven central
org.ow2.asm:asm-tree-5.0.1.jarorg.objectweb.asm.treeMaven central
org.apache.aries:org.apache.aries.util-1.0.1.jarorg.apache.aries.utilMaven central
org.apache.aries.spifly:org.apache.aries.spifly.dynamic.bundle-1.0.1.jarorg.apache.aries.spifly.dynamic.bundleMaven central
javax.annotation:javax.annotation-api-1.2.jarjavax.annotation-apiMaven central
jta api version 1.1.1 (eg org.apache.geronimo.specs:geronimo-jta_1.1_spec-1.1.1.jar)* Maven central
javax mail api version 1.4.1 (eg org.eclipse.jetty.orbit:javax.mail.glassfish-1.4.1.v201005082020.jar)* Maven central
jetty-jndiorg.eclipse.jetty.jndiDistribution lib/
jetty-plusorg.eclipse.jetty.plusDistribution lib/
jetty-annotationsorg.eclipse.jetty.annotationsDistribution lib/

Important

If you wish to use JSPs you will need to deploy these annotation-related jars.

Note

* You may be able to deploy later versions or other providers of these specifications, however these particular versions are known to have correct manifests and have been tested and known to work with OSGi

Even if your webapp itself does not not use annotations, you may need to deploy these jars because your webapp depends on a Jetty module or a 3rd party library that uses a javax.servlet.ServletContainerInitializer. This interface requires annotation support. It is implemented by providers of code that extend the capabilities of the container. An example of this is the Jetty JSR356 Websocket implementation, although it is being used increasingly commonly in popular libraries like Spring, Jersey and JSP containers.

To find ServletContainerInitializers on the classpath, Jetty uses the Java ServiceLoader mechanism. For this to function in OSGi, you will need an OSGi R5 compatible container, and have support for the Service Loader Mediator. Jetty has been tested with the Aries SpiFly module, which is the reference implementation of the Service Loader Mediator, and is listed in the jars above.

Felix

The Jetty OSGi integration has been successfully tested against Felix 4.4.1.

Unfortunately, as of Felix 4.x there is a difficultly with the resolution of the javax.transaction package. A description of the problem and hint to solving it is described here.

The simplest solution for this is to extract the default.properties file from the felix.jar, change the declaration of the javax.sql and javax.transaction packages and set the changed lines as the value of the org.osgi.framework.system.packages property in the conf/config.properties file.

The default.properties file defines the default org.osgi.framework.system.packages property like this:

The last line must be substituted for one of the definitions further down in the file that is suitable for the jvm you are using.

You will take these lines and copy them into the conf/config.properties file, after having replaced the line ${jre-${java.specification.version}} with all of the lines relevant to your version of the jvm.

For example, for a 1.7 jvm, you will find this property definition:

Remove the definition for the javax.transaction packages, and remove the uses:= clause for the javax.sql packages (but leaving the version clause). Concatenate all the lines together. You'll wind up with something like this in your conf/config.properties file:

You should now be able to start Felix, and deploy all the jars listed on this page. You should see output similar to this on the console, using the felix:lb command:

    ID|State      |Level|Name
    0|Active     |    0|System Bundle (4.4.1)
    1|Active     |    1|ASM (5.0.1)
    2|Active     |    1|ASM commons classes (5.0.1)
    3|Active     |    1|ASM Tree class visitor (5.0.1)
    4|Active     |    1|geronimo-jta_1.1_spec (1.1.1)
    5|Active     |    1|javax.annotation API (1.2.0)
    6|Active     |    1|javax.mail bundle from Glassfish (1.4.1.v201005082020)
    7|Active     |    1|Java Server Pages Standard Tag Library API Bundle (1.2.0.v201105211821)
    8|Active     |    1|JavaServer Pages (TM) TagLib Implementation (1.2.2)
    9|Active     |    1|Jetty :: Servlet Annotations (9.2.4.SNAPSHOT)
   10|Active     |    1|Jetty :: Deployers (9.2.4.SNAPSHOT)
   11|Active     |    1|Jetty :: Http Utility (9.2.4.SNAPSHOT)
   12|Active     |    1|Jetty :: IO Utility (9.2.4.SNAPSHOT)
   13|Active     |    1|Jetty :: JNDI Naming (9.2.4.SNAPSHOT)
   14|Active     |    1|Jetty :: OSGi :: Boot (9.2.4.SNAPSHOT)
   15|Resolved   |    1|Jetty-OSGi-Jasper Integration (9.2.4.SNAPSHOT)
   16|Active     |    1|Jetty Servlet API and Schemas for OSGi (3.1.0.SNAPSHOT)
   17|Active     |    1|Jetty :: Plus (9.2.4.SNAPSHOT)
   18|Active     |    1|Jetty :: Security (9.2.4.SNAPSHOT)
   19|Active     |    1|Jetty :: Server Core (9.2.4.SNAPSHOT)
   20|Active     |    1|Jetty :: Servlet Handling (9.2.4.SNAPSHOT)
   21|Active     |    1|Jetty :: Utility Servlets and Filters (9.2.4.SNAPSHOT)
   22|Active     |    1|Jetty :: Utilities (9.2.4.SNAPSHOT)
   23|Active     |    1|Jetty :: Webapp Application Support (9.2.4.SNAPSHOT)
   24|Active     |    1|Jetty :: XML utilities (9.2.4.SNAPSHOT)
   25|Active     |    1|Apache Aries SPI Fly Dynamic Weaving Bundle (1.0.1)
   26|Active     |    1|Apache Aries Util (1.0.0)
   27|Active     |    1|Apache Felix Bundle Repository (2.0.2)
   28|Active     |    1|Apache Felix Configuration Admin Service (1.8.0)
   29|Active     |    1|Apache Felix EventAdmin (1.3.2)
   30|Active     |    1|Apache Felix Gogo Command (0.14.0)
   31|Active     |    1|Apache Felix Gogo Runtime (0.12.1)
   32|Active     |    1|Apache Felix Gogo Shell (0.10.0)
   33|Active     |    1|Apache Felix Log Service (1.0.1)
   34|Active     |    1|Jetty :: Apache JSP (9.2.4.SNAPSHOT)
   35|Active     |    1|Eclipse Compiler for Java(TM) (3.8.2.v20130121-145325)
   36|Active     |    1|Mortbay EL API and Implementation (8.0.9)
   37|Active     |    1|Mortbay Jasper (8.0.9)

See an error or something missing? Contribute to this documentation at Github!(Generated: 2014-10-24T01:00:37-07:00)