blob: 0600b9856abb389f3e6631df99043808e87f2082 [file] [log] [blame]
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>OSGI</title><link rel="stylesheet" type="text/css" href="css/docbook.css"><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><meta name="keywords" content="jetty, servlet, servlet-api, cometd, http, websocket, eclipse, maven, java, server, software"><link rel="home" href="index.html" title="Jetty"><link rel="up" href="frameworks.html" title="Chapter&nbsp;29.&nbsp;Frameworks"><link rel="prev" href="frameworks.html" title="Chapter&nbsp;29.&nbsp;Frameworks"><link rel="next" href="framework-weld.html" title="Weld"><link xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times" rel="shortcut icon" href="images/favicon.ico"><link rel="stylesheet" href="css/highlighter/foundation.css"><script src="js/highlight.pack.js"></script><script>
hljs.initHighlightingOnLoad();
</script><link type="text/css" rel="stylesheet" href="css/font-awesome/font-awesome.min.css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><tr><td style="width: 25%"><a href="http://www.eclipse.org/jetty"><img src="images/jetty-header-logo.png" alt="Jetty Logo"></a><br><span style="font-size: small">
Version: 9.3.28.v20191105</span></td><td style="width: 50%"></td></tr></table><div xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times" class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">OSGI</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="frameworks.html"><i class="fa fa-chevron-left" aria-hidden="true"></i> Previous</a>&nbsp;</td><th width="60%" align="center">Chapter&nbsp;29.&nbsp;Frameworks<br><a accesskey="p" href="index.html"><i class="fa fa-home" aria-hidden="true"></i> Home</a></th><td width="20%" align="right">&nbsp;<a accesskey="n" href="framework-weld.html">Next <i class="fa fa-chevron-right" aria-hidden="true"></i></a></td></tr></table><hr></div><div xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times" class="jetty-callout"><h5 class="callout"><a href="http://www.webtide.com/">Contact the core Jetty developers at
<span class="website">www.webtide.com</span></a></h5><p>
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 for sponsored feature development
</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="framework-jetty-osgi"></a>OSGI</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="section"><a href="framework-jetty-osgi.html#_introduction">Introduction</a></span></dt><dt><span class="section"><a href="framework-jetty-osgi.html#_general_setup">General Setup</a></span></dt><dt><span class="section"><a href="framework-jetty-osgi.html#_the_jetty_osgi_container">The Jetty OSGi Container</a></span></dt><dt><span class="section"><a href="framework-jetty-osgi.html#_deploying_bundles_as_webapps">Deploying Bundles as Webapps</a></span></dt><dt><span class="section"><a href="framework-jetty-osgi.html#_deploying_bundles_as_jetty_contexthandlers">Deploying Bundles as Jetty ContextHandlers</a></span></dt><dt><span class="section"><a href="framework-jetty-osgi.html#services-as-webapps">Deploying Services as Webapps</a></span></dt><dt><span class="section"><a href="framework-jetty-osgi.html#_deploying_services_as_contexthandlers">Deploying Services as ContextHandlers</a></span></dt><dt><span class="section"><a href="framework-jetty-osgi.html#_support_for_the_osgi_service_platform_enterprise_specification">Support for the OSGi Service Platform Enterprise Specification</a></span></dt><dt><span class="section"><a href="framework-jetty-osgi.html#_using_jsps">Using JSPs</a></span></dt><dt><span class="section"><a href="framework-jetty-osgi.html#osgi-annotations">Using Annotations/ServletContainerInitializers</a></span></dt><dt><span class="section"><a href="framework-jetty-osgi.html#_osgi_containers">OSGi Containers</a></span></dt></dl></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_introduction"></a>Introduction</h3></div></div></div><p>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.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_general_setup"></a>General Setup</h3></div></div></div><p>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&#8217;s the absolute minimal set of
jetty jars:</p><div class="table"><a name="d0e23934"></a><p class="title"><b>Table&nbsp;29.1.&nbsp;Bundle Name Mapping</b></p><div class="table-contents"><table class="table" summary="Bundle Name Mapping" border="1"><colgroup><col class="col_1"><col class="col_2"></colgroup><thead><tr><th align="left" valign="top">Jar</th><th align="left" valign="top">Bundle Symbolic Name</th></tr></thead><tbody><tr><td align="left" valign="top"><p>jetty-util</p></td><td align="left" valign="top"><p>org.eclipse.jetty.util</p></td></tr><tr><td align="left" valign="top"><p>jetty-http</p></td><td align="left" valign="top"><p>org.eclipse.jetty.http</p></td></tr><tr><td align="left" valign="top"><p>jetty-io</p></td><td align="left" valign="top"><p>org.eclipse.jetty.io</p></td></tr><tr><td align="left" valign="top"><p>jetty-security</p></td><td align="left" valign="top"><p>org.eclipse.jetty.security</p></td></tr><tr><td align="left" valign="top"><p>jetty-server</p></td><td align="left" valign="top"><p>org.eclipse.jetty.server</p></td></tr><tr><td align="left" valign="top"><p>jetty-servlet</p></td><td align="left" valign="top"><p>org.eclipse.jetty.servlet</p></td></tr><tr><td align="left" valign="top"><p>jetty-webapp</p></td><td align="left" valign="top"><p>org.eclipse.jetty.webapp</p></td></tr><tr><td align="left" valign="top"><p>jetty-deploy</p></td><td align="left" valign="top"><p>org.eclipse.jetty.deploy</p></td></tr><tr><td align="left" valign="top"><p>jetty-xml</p></td><td align="left" valign="top"><p>org.eclipse.jetty.xml</p></td></tr><tr><td align="left" valign="top"><p>jetty-osgi-servlet-api</p></td><td align="left" valign="top"><p>org.eclipse.jetty.toolchain</p></td></tr></tbody></table></div></div><br class="table-break"><div class="blockquote"><blockquote class="blockquote"><div xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times" class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title"><i class="fa fa-asterisk" aria-hidden="true"></i> Note</h3><p></p></div><p>We recommend that you also deploy the
<a class="link" href="framework-jetty-osgi.html#osgi-annotations" title="Using Annotations/ServletContainerInitializers">annotation-related</a> jars also, as increasingly
the Servlet Specification relies on annotations for functionality.</p></blockquote></div><p>You will also need the<span class="strong"><strong>OSGi Event Management service</strong></span> and the <span class="strong"><strong>OSGi
Configuration Management service</strong></span>. If your OSGi container does not
automatically make these available, you will need to add them in a way
appropriate to your container.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_the_jetty_osgi_container"></a>The Jetty OSGi Container</h3></div></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="_the_jetty_osgi_boot_jar"></a>The jetty-osgi-boot jar</h4></div></div></div><p>Now that you have the basic set of Jetty jars installed, you can install
the
<a class="link" href="http://central.maven.org/maven2/org/eclipse/jetty/osgi/jetty-osgi-boot/" target="_top">jetty-osgi-boot.jar</a>
bundle, downloadable from the maven central repo
<a class="link" href="http://central.maven.org/maven2/org/eclipse/jetty/osgi/jetty-osgi-boot/" target="_top">here.</a></p><p>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.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="customize-jetty-container"></a>Customizing the Jetty Container</h4></div></div></div><p>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.</p><p>The available System properties are:</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">jetty.http.port</span></dt><dd>If not specified, this defaults to the usual jetty port of 8080.</dd><dt><span class="term">jetty.home</span></dt><dd>Either this property <span class="emphasis"><em>or</em></span> the <span class="strong"><strong>jetty.home.bundle</strong></span> <span class="emphasis"><em>must</em></span> be specified.
This property should point to a file system location that has an
<code class="literal">etc/</code> directory containing xml files to configure the Jetty container
on startup. For example:
+</dd></dl></div><pre xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><code>jetty.home=/opt/custom/jetty</code></pre><pre class="literallayout">+
Where `/opt/custom/jetty` contains:
+</pre><pre xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><code>etc/jetty.xml
etc/jetty-selector.xml
etc/jetty-deployer.xml
etc/jetty-special.xml</code></pre><div class="variablelist"><dl class="variablelist"><dt><span class="term">jetty.home.bundle</span></dt><dd>Either this property <span class="emphasis"><em>or</em></span> the <span class="strong"><strong>jetty.home</strong></span> property must be specified.
This property should specify the symbolic name of a bundle which
contains a directory called <code class="literal">jettyhome/</code>. The`
jettyhome/` directory should have a subdirectory called
<code class="literal">etc/</code> 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&#8217;s how you would specify it:
+</dd></dl></div><pre xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><code>jetty.home.bundle=org.eclipse.jetty.osgi.boot</code></pre><pre class="literallayout">+
Here's a partial listing of that jar that shows you the names of the
xml files contained within it:
+</pre><pre xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><code>META-INF/MANIFEST.MF
jettyhome/etc/jetty.xml
jettyhome/etc/jetty-deployer.xml
jettyhome/etc/jetty-http.xml</code></pre><div class="variablelist"><dl class="variablelist"><dt><span class="term">jetty.etc.config.urls</span></dt><dd>This specifies the paths of the xml files that are to be used. If not
specified, they default to:
+</dd></dl></div><pre xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><code>etc/jetty.xml,etc/jetty-http.xml,etc/jetty-deployer.xml</code></pre><pre class="literallayout">+
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:
+</pre><pre class="literallayout">etc/jetty.xml, etc/jetty-http.xml, /opt/jetty/etc/jetty-ssl.xml, /opt/jetty/etc/jetty-https.xml, etc/jetty-deployer.xml</pre><pre class="literallayout">+
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 &lt;property name="jetty.home"&gt; 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.</pre></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="_the_jetty_container_as_an_osgi_service"></a>The Jetty Container as an OSGi Service</h4></div></div></div><p>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:</p><pre xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><code>org.osgi.framework.BundleContext bc;
org.osgi.framework.ServiceReference ref = bc.getServiceReference("org.eclipse.jetty.server.Server");</code></pre><p>The Server service has a couple of properties associated with it that
you can retrieve using the
org.osgi.framework.ServiceReference.getProperty(String) method:</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">managedServerName</span></dt><dd>The Jetty Server instance created by the jetty-osgi-boot.jar will be
called "defaultJettyServer"</dd><dt><span class="term">jetty.etc.config.urls</span></dt><dd>The list of xml files resolved from either <span class="strong"><strong>jetty.home</strong></span>
or<span class="strong"><strong>jetty.home.bundle</strong></span>/jettyhome</dd></dl></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="_adding_more_jetty_servers"></a>Adding More Jetty Servers</h4></div></div></div><p>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 <span class="strong"><strong>jetty.etc.config.urls</strong></span> System property
to it, and then register it as an OSGi Service. The name associated with
this default instance is "defaultJettyServer".</p><p>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&#8217;s name.</p><p>Here&#8217;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:</p><pre xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><code>public class Activator implements BundleActivator
{
public void start(BundleContext context) throws Exception
{
Server server = new Server();
//do any setup on Server in here
String serverName = "fooServer";
Dictionary serverProps = new Hashtable();
//define the unique name of the server instance
serverProps.put("managedServerName", serverName);
serverProps.put("jetty.http.port", "9999");
//let Jetty apply some configuration files to the Server instance
serverProps.put("jetty.etc.config.urls", "file:/opt/jetty/etc/jetty.xml,file:/opt/jetty/etc/jetty-selector.xml,file:/opt/jetty/etc/jetty-deployer.xml");
//register as an OSGi Service for Jetty to find
context.registerService(Server.class.getName(), server, serverProps);
}
}</code></pre><p>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&#8217;s an example of deploying a webapp as a
Service and targetting it to the "fooServer" Server we created above:</p><pre xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><code>public class Activator implements BundleActivator
{
public void start(BundleContext context) throws Exception
{
//Create a webapp context as a Service and target it at the "fooServer" Server instance
WebAppContext webapp = new WebAppContext();
Dictionary props = new Hashtable();
props.put("war",".");
props.put("contextPath","/acme");
props.put("managedServerName", "fooServer");
context.registerService(ContextHandler.class.getName(),webapp,props);
}
}</code></pre></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_deploying_bundles_as_webapps"></a>Deploying Bundles as Webapps</h3></div></div></div><p>The Jetty OSGi container listens for the installation of bundles, and
will automatically attempt to deploy any that appear to be webapps.</p><p>Any of the following criteria are sufficient for Jetty to deploy the
bundle as a webapp:</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">Bundle contains a WEB-INF/web.xml file</span></dt><dd> 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 (for releases prior to</dd><dt><span class="term">jetty-9.3) or Jetty-WarResourcePath</span></dt><dd>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&#8217;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 <code class="literal">web/</code> :
+
<code class="literal">MANIFEST</code>:
+</dd></dl></div><pre xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><code>Bundle-Name: Web
Jetty-WarResourcePath: web
Import-Package: javax.servlet;version="3.1",
javax.servlet.resources;version="3.1"
Bundle-SymbolicName: com.acme.sample.web</code></pre><pre class="literallayout">+
Bundle contents:
+</pre><pre xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><code>META-INF/MANIFEST.MF
web/index.html
web/foo.html
web/WEB-INF/web.xml
com/acme/sample/web/MyStuff.class
com/acme/sample/web/MyOtherStuff.class</code></pre><div class="variablelist"><dl class="variablelist"><dt><span class="term">Bundle MANIFEST contains Web-ContextPath</span></dt><dd>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&#8217;s contents should be
published as a webapp. This header is part of the RFC-66 specification
for using webapps with OSGi. Here&#8217;s an eample based on the previous
one where we use the Web-ContextPath header to set its deployment
context path to be "/sample" :
+
<code class="literal">MANIFEST</code>:
+</dd></dl></div><pre xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><code>Bundle-Name: Web
Jetty-WarResourcePath: web
Web-ContextPath: /sample
Import-Package: javax.servlet;version="3.1",
javax.servlet.resources;version="3.1"
Bundle-SymbolicName: com.acme.sample.web</code></pre><p>You can also define extra headers in your bundle MANIFEST that help
customize the web app to be deployed:</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">Jetty-defaultWebXmlFilePath</span></dt><dd>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.</dd><dt><span class="term">Jetty-WebXmlFilePath</span></dt><dd>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</dd><dt><span class="term">Jetty-extraClassPath</span></dt><dd>A classpath of additional items to add to the webapp&#8217;s classloader.</dd><dt><span class="term">Jetty-bundleInstall</span></dt><dd>The path to the base folder that overrides the computed bundle
installation - mostly useful for those OSGi frameworks that unpack
bundles by default.</dd><dt><span class="term">Require-TldBundle</span></dt><dd>A comma separated list of bundle symbolic names of bundles containing
TLDs that this webapp depends upon.</dd><dt><span class="term">managedServerName</span></dt><dd>The name of the Server instance to which to deploy this webapp bundle.
If not specified, defaults to the default Server instance called
"defaultJettyServer".</dd><dt><span class="term">Jetty-WarFragmentResourcePath</span></dt><dd>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).</dd><dt><span class="term">Jetty-WarPrependFragmentResourcePath</span></dt><dd>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).</dd><dt><span class="term">Jetty-ContextFilePath</span></dt><dd>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&#8217;s META-INF directory
and it will be automatically applied to the webapp.</dd></dl></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="_determining_the_context_path_for_a_webapp_bundle"></a>Determining the Context Path for a Webapp Bundle</h4></div></div></div><p>As we have seen in the previous section, if the bundle <code class="literal">MANIFEST</code>
contains the RFC-66 header <span class="strong"><strong>Web-ContextPath</strong></span>, 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&#8217;s location (by calling Bundle.getLocation()) after stripping off
any file extensions.</p><p>For example, suppose we have a bundle whose location is:</p><pre xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><code>file://some/where/over/the/rainbow/oz.war</code></pre><p>The corresponding synthesized context path would be:</p><pre xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><code>/oz</code></pre></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="_extra_properties_available_for_webapp_bundles"></a>Extra Properties Available for Webapp Bundles</h4></div></div></div><p>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
<code class="literal">META-INF</code> of the bundle, and must be called <code class="literal">jetty-webapp-context.xml</code>.</p><p>Here&#8217;s an example of a webapp bundle listing containing such a file:</p><pre xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><code>META-INF/MANIFEST.MF
META-INF/jetty-webapp-context.xml
web/index.html
web/foo.html
web/WEB-INF/web.xml
com/acme/sample/web/MyStuff.class
com/acme/sample/web/MyOtherStuff.class</code></pre><p>Here&#8217;s an example of the contents of a META-INF/jetty-webapp-context.xml
file:</p><pre class="literallayout">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd"&gt;
&lt;Configure class="org.eclipse.jetty.webapp.WebAppContext"&gt;
&lt;Set name="defaultsDescriptor"&gt;&lt;Property name="bundle.root"/&gt;META-INF/webdefault.xml&lt;/Set&gt;
&lt;/Configure&gt;</pre><p>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</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">Server</span></dt><dd>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.</dd><dt><span class="term">bundle.root</span></dt><dd>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.</dd></dl></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_deploying_bundles_as_jetty_contexthandlers"></a>Deploying Bundles as Jetty ContextHandlers</h3></div></div></div><p>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.</p><p>The following is the criteria used to decide if a bundle can be deployed
as a ContextHandler:</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">Bundle MANIFEST contains Jetty-ContextFilePath</span></dt><dd>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
<span class="strong"><strong>jetty.home</strong></span> directory.
+
A context file that is inside the bundle:
+</dd></dl></div><pre xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><code>Jetty-ContextFilePath: ./a/b/c/d/foo.xml</code></pre><pre class="literallayout">+
A context file that is on the file system:
+</pre><pre xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><code>Jetty-ContextFilePath: /opt/app/contexts/foo.xml</code></pre><pre class="literallayout">+
A context file that is relative to jetty.home:
+</pre><pre xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><code>Jetty-ContextFilePath: contexts/foo.xml</code></pre><pre class="literallayout">+
A number of different context files:
+</pre><pre xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><code>Jetty-ContextFilePath: ./a/b/c/d/foo.xml,/opt/app/contexts/foo.xml,contexts/foo.xml</code></pre><p>Other MANIFEST properties that can be used to configure the deployment
of the ContextHandler:</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">managedServerName</span></dt><dd>The name of the Server instance to which to deploy this webapp bundle.
If not specified, defaults to the default Server instance called
"defaultJettyServer".</dd></dl></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="_determining_the_context_path_for_a_contexthandler_bundle"></a>Determining the Context Path for a ContextHandler Bundle</h4></div></div></div><p>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 <span class="strong"><strong>Web-ContextPath</strong></span> header in the <code class="literal">MANIFEST</code>.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="_extra_properties_available_for_context_xml_files"></a>Extra Properties Available for Context Xml Files</h4></div></div></div><p>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:</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">Server</span></dt><dd>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.</dd><dt><span class="term">bundle.root</span></dt><dd>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.</dd></dl></div><p>Here&#8217;s an example of a context xml file that makes use of these
properties:</p><pre xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd"&gt;
&lt;Configure class="org.eclipse.jetty.server.handler.ContextHandler"&gt;
&lt;!-- Get root for static content, could be on file system or this bundle --&gt;
&lt;Call id="res" class="org.eclipse.jetty.util.resource.Resource" name="newResource"&gt;
&lt;Arg&gt;&lt;Property name="bundle.root"/&gt;&lt;/Arg&gt;
&lt;/Call&gt;
&lt;Ref refid="res"&gt;
&lt;Call id="base" name="addPath"&gt;
&lt;Arg&gt;/static/&lt;/Arg&gt;
&lt;/Call&gt;
&lt;/Ref&gt;
&lt;Set name="contextPath"&gt;/unset&lt;/Set&gt;
&lt;!-- Set up the base resource for static files relative to inside bundle --&gt;
&lt;Set name="baseResource"&gt;
&lt;Ref refid="base"/&gt;
&lt;/Set&gt;
&lt;Set name="handler"&gt;
&lt;New class="org.eclipse.jetty.server.handler.ResourceHandler"&gt;
&lt;Set name="welcomeFiles"&gt;
&lt;Array type="String"&gt;
&lt;Item&gt;index.html&lt;/Item&gt;
&lt;/Array&gt;
&lt;/Set&gt;
&lt;Set name="cacheControl"&gt;max-age=3600,public&lt;/Set&gt;
&lt;/New&gt;
&lt;/Set&gt;
&lt;/Configure&gt;</code></pre></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="services-as-webapps"></a>Deploying Services as Webapps</h3></div></div></div><p>In addition to listening for bundles whose format or <code class="literal">MANIFEST</code> 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.</p><p>Here&#8217;s an example of doing that with a simple bundle that serves static
content, and an org.osgi.framework.BundleActivator that instantiates the
WebAppContext:</p><p>The bundle contents:</p><pre xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><code>META-INF/MANIFEST.MF
index.html
com/acme/osgi/Activator.class</code></pre><p>The <code class="literal">MANIFEST.MF</code>:</p><pre xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><code>Bundle-Classpath: .
Bundle-Name: Jetty OSGi Test WebApp
DynamicImport-Package: org.eclipse.jetty.*;version="[9.0,10.0)"
Bundle-Activator: com.acme.osgi.Activator
Import-Package: org.eclipse.jetty.server.handler;version="[9.0,10)",
org.eclipse.jetty.webapp;version="[9.0,10)",
org.osgi.framework;version= "[1.5,2)",
org.osgi.service.cm;version="1.2.0",
org.osgi.service.packag eadmin;version="[1.2,2)",
org.osgi.service.startlevel;version="1.0.0",
org.osgi.service.url;version="1.0.0",
org.osgi.util.tracker;version= "1.3.0",
org.xml.sax,org.xml.sax.helpers
Bundle-SymbolicName: com.acme.testwebapp</code></pre><p>The Activator code:</p><pre xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><code>public void start(BundleContext context) throws Exception
{
WebAppContext webapp = new WebAppContext();
Dictionary props = new Hashtable();
props.put("Jetty-WarResourcePath",".");
props.put("contextPath","/acme");
context.registerService(ContextHandler.class.getName(),webapp,props);
}</code></pre><p>The above setup is sufficient for Jetty to recognize and deploy the
WebAppContext at /acme.</p><p>As the example shows, you can use OSGi Service properties in order to
communicate extra configuration information to Jetty:</p><p>Jetty-WarFolderPath (for releases prior to 9.3) or
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&#8217;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).</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_deploying_services_as_contexthandlers"></a>Deploying Services as ContextHandlers</h3></div></div></div><p>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.</p><p>Here&#8217;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:</p><p>The bundle contents:</p><pre xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><code>META-INF/MANIFEST.MF
static/index.html
acme.xml
com/acme/osgi/Activator.class
com/acme/osgi/Activator$1.class</code></pre><p>The <code class="literal">MANIFEST</code>:</p><pre xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><code>Bundle-Classpath: .
Bundle-Name: Jetty OSGi Test Context
DynamicImport-Package: org.eclipse.jetty.*;version="[9.0,10.0)"
Bundle-Activator: com.acme.osgi.Activator
Import-Package: javax.servlet;version="2.6.0",
javax.servlet.resources;version="2.6.0",
org.eclipse.jetty.server.handler;version="[9.0,10)",
org.osgi.framework;version="[1.5,2)",
org.osgi.service.cm;version="1.2.0",
org.osgi.service.packageadmin;version="[1.2,2)",
org.osgi.service.startlevel;version="1.0.0.o",
org.osgi.service.url;version="1.0.0",
org.osgi.util.tracker;version="1.3.0",
org.xml.sax,org.xml.sax.helpers
Bundle-SymbolicName: com.acme.testcontext</code></pre><p>The Activator code:</p><pre xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><code>public void start(final BundleContext context) throws Exception
{
ContextHandler ch = new ContextHandler();
ch.addEventListener(new ServletContextListener () {
@Override
public void contextInitialized(ServletContextEvent sce)
{
System.err.println("Context is initialized");
}
@Override
public void contextDestroyed(ServletContextEvent sce)
{
System.err.println("Context is destroyed!");
}
});
Dictionary props = new Hashtable();
props.put("Web-ContextPath","/acme");
props.put("Jetty-ContextFilePath", "acme.xml");
context.registerService(ContextHandler.class.getName(),ch,props);
}</code></pre><p>The contents of the <code class="literal">acme.xml</code> context file:</p><pre xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd"&gt;
&lt;Configure class="org.eclipse.jetty.server.handler.ContextHandler"&gt;
&lt;!-- Get root for static content, could be on file system or this bundle --&gt;
&lt;Call id="res" class="org.eclipse.jetty.util.resource.Resource" name="newResource"&gt;
&lt;Arg&gt;&lt;Property name="bundle.root"/&gt;&lt;/Arg&gt;
&lt;/Call&gt;
&lt;Ref refid="res"&gt;
&lt;Call id="base" name="addPath"&gt;
&lt;Arg&gt;/static/&lt;/Arg&gt;
&lt;/Call&gt;
&lt;/Ref&gt;
&lt;Set name="contextPath"&gt;/unset&lt;/Set&gt;
&lt;!-- Set up the base resource for static files relative to inside bundle --&gt;
&lt;Set name="baseResource"&gt;
&lt;Ref refid="base"/&gt;
&lt;/Set&gt;
&lt;Set name="handler"&gt;
&lt;New class="org.eclipse.jetty.server.handler.ResourceHandler"&gt;
&lt;Set name="welcomeFiles"&gt;
&lt;Array type="String"&gt;
&lt;Item&gt;index.html&lt;/Item&gt;
&lt;/Array&gt;
&lt;/Set&gt;
&lt;Set name="cacheControl"&gt;max-age=3600,public&lt;/Set&gt;
&lt;/New&gt;
&lt;/Set&gt;
&lt;/Configure&gt;</code></pre><p>You may also use the following OSGi Service properties:</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">managedServerName</span></dt><dd>The name of the Server instance to which to deploy this webapp. If not
specified, defaults to the default Server instance called
"defaultJettyServer".</dd></dl></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="_extra_properties_available_for_context_xml_files_2"></a>Extra Properties Available for Context Xml Files</h4></div></div></div><p>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:</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">Server</span></dt><dd>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.</dd><dt><span class="term">bundle.root</span></dt><dd>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.</dd></dl></div><p>In the example above, you can see both of these properties being used in
the context xml file.</p></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_support_for_the_osgi_service_platform_enterprise_specification"></a>Support for the OSGi Service Platform Enterprise Specification</h3></div></div></div><p>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.</p><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="_context_attributes"></a>Context Attributes</h4></div></div></div><p>For each WebAppContext or ContextHandler, the following context
attribute is set, as required by section<span class="emphasis"><em>128.6.1 Bundle Context</em></span> pg
427:</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">osgi-bundleContext</span></dt><dd>The value of this attribute is the BundleContext representing the
Bundle associated with the WebAppContext or ContextHandler.</dd></dl></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="_service_attributes"></a>Service Attributes</h4></div></div></div><p>As required by the specification section <span class="emphasis"><em>128.3.4 Publishing the Servlet
Context</em></span> 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:</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">osgi.web.symbolicname</span></dt><dd>The symbolic name of the Bundle associated with the WebAppContext or
ContextHandler</dd><dt><span class="term">osgi.web.version</span></dt><dd>The Bundle-Version header from the Bundle associated with the
WebAppContext or ContextHandler</dd><dt><span class="term">osgi.web.contextpath</span></dt><dd>The context path of the WebAppContext or ContextHandler</dd></dl></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="_osgi_events"></a>OSGi Events</h4></div></div></div><p>As required by the specification section <span class="emphasis"><em>128.5 Events</em></span> pg 426, the
following OSGi Event Admin events will be posted:</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">org/osgi/service/web/DEPLOYING</span></dt><dd>The Jetty OSGi container is about to deploy a WebAppContext or
ContextHandler</dd><dt><span class="term">org/osgi/service/web/DEPLOYED</span></dt><dd>The Jetty OSGi container has finished deploying a WebAppContext or
ContextHandler and it is in service</dd><dt><span class="term">org/osgi/service/web/UNDEPLOYING</span></dt><dd>The Jetty OSGi container is about to undeploy a WebAppContext or
ContextHandler</dd><dt><span class="term">org/osgi/service/web/UNDEPLOYED</span></dt><dd>The Jetty OSGi container has finished undeploying a WebAppContext or
ContextHandler and it is no longer in service</dd><dt><span class="term">org/osgi/service/web/FAILED</span></dt><dd>The Jetty OSGi container failed to deploy a WebAppContext or
ContextHandler</dd></dl></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_using_jsps"></a>Using JSPs</h3></div></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="_setup"></a>Setup</h4></div></div></div><p>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
<a class="link" href="http://central.maven.org/maven2/org/eclipse/jetty/orbit/" target="_top">Maven central</a>.
Here is the list of recommended jars (NOTE the version numbers may
change in future):</p><div class="table"><a name="d0e24585"></a><p class="title"><b>Table&nbsp;29.2.&nbsp;Jars Required for JSP</b></p><div class="table-contents"><table class="table" summary="Jars Required for JSP" border="1"><colgroup><col class="col_1"><col class="col_2"><col class="col_3"></colgroup><thead><tr><th align="left" valign="top">Jar</th><th align="left" valign="top">Bundle Symbolic Name</th><th align="left" valign="top">Location</th></tr></thead><tbody><tr><td align="left" valign="top"><p>The <a class="link" href="framework-jetty-osgi.html#osgi-annotations" title="Using Annotations/ServletContainerInitializers">annotation jars</a></p></td><td align="left" valign="top">&nbsp;</td><td align="left" valign="top">&nbsp;</td></tr><tr><td align="left" valign="top"><p>org.mortbay.jasper:apache-el</p></td><td align="left" valign="top"><p>org.mortbay.jasper.apache-el</p></td><td align="left" valign="top"><p>Distribution lib/apache-jsp</p></td></tr><tr><td align="left" valign="top"><p>org.mortbay.jasper:apache-jsp</p></td><td align="left" valign="top"><p>org.mortbay.jasper.apache-jsp</p></td><td align="left" valign="top"><p>Distribution lib/apache-jsp</p></td></tr><tr><td align="left" valign="top"><p>org.eclipse.jetty:apache-jsp</p></td><td align="left" valign="top"><p>org.eclipse.jetty.apache-jsp</p></td><td align="left" valign="top"><p>Distribution lib/apache-jsp</p></td></tr><tr><td align="left" valign="top"><p>org.eclipse.jdt.core-3.8.2.v20130121.jar</p></td><td align="left" valign="top"><p>org.eclipse.jdt.core.compiler.batch</p></td><td align="left" valign="top"><p>Distribution lib/apache-jsp</p></td></tr><tr><td align="left" valign="top"><p>org.eclipse.jetty.osgi:jetty-osgi-boot-jsp</p></td><td align="left" valign="top"><p>org.eclipse.jetty.osgi.boot.jsp</p></td><td align="left" valign="top"><p><a class="link" href="http://central.maven.org/maven2/org/eclipse/jetty/osgi/jetty-osgi-boot-jsp" target="_top">Maven
central</a></p></td></tr></tbody></table></div></div><br class="table-break"><div class="blockquote"><blockquote class="blockquote"><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">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.</li><li class="listitem">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.</li></ol></div></blockquote></div><p>For the JSTL library, we recommend the use of the implementation from
Glassfish, as it has fewer dependencies:</p><div class="table"><a name="d0e24670"></a><p class="title"><b>Table&nbsp;29.3.&nbsp;Jars Required for Glassfish JSTL</b></p><div class="table-contents"><table class="table" summary="Jars Required for Glassfish JSTL" border="1"><colgroup><col class="col_1"><col class="col_2"><col class="col_3"></colgroup><thead><tr><th align="left" valign="top">Jar</th><th align="left" valign="top">Bundle Symbolic Name</th><th align="left" valign="top">Location</th></tr></thead><tbody><tr><td align="left" valign="top"><p>The jsp jars</p></td><td align="left" valign="top">&nbsp;</td><td align="left" valign="top">&nbsp;</td></tr><tr><td align="left" valign="top"><p>org.eclipse.jetty.orbit:javax.servlet.jsp.jstl-1.2.0.v201105211821.jar</p></td><td align="left" valign="top"><p>javax.servlet.jsp.jstl</p></td><td align="left" valign="top"><p>Distribution lib/jsp</p></td></tr><tr><td align="left" valign="top"><p>org.glassfish.web:javax.servlet.jsp.jstl-1.2.2.jar</p></td><td align="left" valign="top"><p>org.glassfish.web.javax.servlet.jsp.jstl</p></td><td align="left" valign="top"><p>Distribution lib/jsp</p></td></tr></tbody></table></div></div><br class="table-break"><p>However, if you wish, you may use the JSTL implementation from Apache
instead, although you will need to source some dependency jars with
suitable OSGi manifests:</p><div class="table"><a name="d0e24714"></a><p class="title"><b>Table&nbsp;29.4.&nbsp;Jars Required for Apache JSTL</b></p><div class="table-contents"><table class="table" summary="Jars Required for Apache JSTL" border="1"><colgroup><col class="col_1"><col class="col_2"><col class="col_3"></colgroup><thead><tr><th align="left" valign="top">Jar</th><th align="left" valign="top">Bundle Symbolic Name</th><th align="left" valign="top">Location</th></tr></thead><tbody><tr><td align="left" valign="top"><p>The jsp jars</p></td><td align="left" valign="top">&nbsp;</td><td align="left" valign="top">&nbsp;</td></tr><tr><td align="left" valign="top"><p>org.apache.taglibs:taglibs-standard-spec:jar:1.2.1</p></td><td align="left" valign="top"><p>org.apache.taglibs.taglibs-standard-spec</p></td><td align="left" valign="top"><p>Distribution lib/apache-jstl</p></td></tr><tr><td align="left" valign="top"><p>org.apache.taglibs:taglibs-standard-spec:jar:1.2.1</p></td><td align="left" valign="top"><p>org.apache.taglibs.standard-impl</p></td><td align="left" valign="top"><p>Distribution lib/apache-jstl</p></td></tr><tr><td align="left" valign="top"><p>org.apache.xalan 2.7.1</p></td><td align="left" valign="top">&nbsp;</td><td align="left" valign="top"><p>Try
<a class="link" href="http://download.eclipse.org/tools/orbit/downloads/drops/R20140525021250/repository/plugins/org.apache.xalan_2.7.1.v201005080400.jar" target="_top">Eclipse
Orbit</a></p></td></tr><tr><td align="left" valign="top"><p>org.apache.xml.serializer 2.7.1</p></td><td align="left" valign="top">&nbsp;</td><td align="left" valign="top"><p>Try
<a class="link" href="http://download.eclipse.org/tools/orbit/downloads/drops/R20140525021250/repository/plugins/org.apache.xml.serializer_2.7.1.v201005080400.jar" target="_top">Eclipse
Orbit</a></p></td></tr></tbody></table></div></div><br class="table-break"></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="_the_jetty_osgi_boot_jsp_jar"></a>The jetty-osgi-boot-jsp jar</h4></div></div></div><p>To be able to use JSPs you will need to also install the
<a class="link" href="http://central.maven.org/maven2/org/eclipse/jetty/osgi/jetty-osgi-boot-jsp/" target="_top">jetty-osgi-boot-jsp.jar</a>
into your OSGi container. This jar can be obtained from maven central
<a class="link" href="http://central.maven.org/maven2/org/eclipse/jetty/osgi/jetty-osgi-boot-jsp/" target="_top">here</a>.</p><p>This bundle acts as a fragment extension to the jetty-osgi-boot.jar and
adds in support for using JSP.</p><div class="section"><div class="titlepage"><div><div><h5 class="title"><a name="_using_taglibs"></a>Using TagLibs</h5></div></div></div><p>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.</p><p>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&#8217;s .jsp files.</p><p>Firstly, lets look at an example of a web bundle&#8217;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:</p><pre xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><code>Bundle-SymbolicName: com.acme.sample
Bundle-Name: WebSample
Web-ContextPath: taglibs
Import-Bundle: org.springframework.web.servlet
Require-TldBundle: org.springframework.web.servlet
Bundle-Version: 1.0.0
Import-Package: org.eclipse.virgo.web.dm;version="[3.0.0,4.0.0)",org.s
pringframework.context.config;version="[2.5.6,4.0.0)",org.springframe
work.stereotype;version="[2.5.6,4.0.0)",org.springframework.web.bind.
annotation;version="[2.5.6,4.0.0)",org.springframework.web.context;ve
rsion="[2.5.6,4.0.0)",org.springframework.web.servlet;version="[2.5.6
,4.0.0)",org.springframework.web.servlet.view;version="[2.5.6,4.0.0)"</code></pre><p>The <span class="strong"><strong>Require-TldBundle</strong></span> header tells the Jetty OSGi container that this
bundle contains TLDs that need to be passed over to the JSP container
for processing. The <span class="strong"><strong>Import-Bundle</strong></span> header ensures that the
implementation classes for these TLDs will be available to the webapp on
the OSGi classpath.</p><p>The format of the <span class="strong"><strong>Require-TldBundle</strong></span> header is a comma separated list
of one or more symbolic names of bundles containing TLDs.</p></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a name="_container_path_taglibs"></a>Container Path Taglibs</h5></div></div></div><p>Some TLD jars are required to be found on the Jetty OSGi container&#8217;s
classpath, rather than considered part of the web bundle&#8217;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&#8217;s classpath by using the
System property <span class="strong"><strong>org.eclipse.jetty.osgi.tldbundles</strong></span>:</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">org.eclipse.jetty.osgi.tldbundles</span></dt><dd>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&#8217;s classpath for web
bundles. For example:
+</dd></dl></div><pre xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><code>org.eclipse.jetty.osgi.tldbundles=com.acme.special.tags,com.foo.web,org.bar.web.framework</code></pre><pre class="literallayout">+
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.</pre><p>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&#8217;s classpath.</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">org.eclipse.jetty.server.webapp.containerIncludeBundlePattern</span></dt><dd>This pattern must be specified as a context attribute of the
WebAppContext representing the web bundle. Unless you are deploying
your own WebAppContext (see <a class="link" href="framework-jetty-osgi.html#services-as-webapps" title="Deploying Services as Webapps">Deploying
Services as Webapps</a>), you won&#8217;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 <span class="emphasis"><em>every</em></span> 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 <a class="link" href="framework-jetty-osgi.html#customize-jetty-container" title="Customizing the Jetty Container">customizing
the jetty container</a> for how to do this. Here&#8217;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":
+</dd></dl></div><pre xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><code>&lt;?xml version="1.0"?&gt;
&lt;!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd"&gt;
&lt;Configure id="Server" class="org.eclipse.jetty.server.Server"&gt;
&lt;Call name="addBean"&gt;
&lt;Arg&gt;
&lt;New id="DeploymentManager" class="org.eclipse.jetty.deploy.DeploymentManager"&gt;
&lt;Set name="contexts"&gt;
&lt;Ref refid="Contexts" /&gt;
&lt;/Set&gt;
&lt;Call name="setContextAttribute"&gt;
&lt;Arg&gt;org.eclipse.jetty.server.webapp.ContainerIncludeBundlePattern&lt;/Arg&gt;
&lt;Arg&gt;.*\.tag$|.*\.web$&lt;/Arg&gt;
&lt;/Call&gt;
&lt;/New&gt;
&lt;/Arg&gt;
&lt;/Call&gt;
&lt;/Configure&gt;</code></pre><pre class="literallayout">+
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.</pre></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="osgi-annotations"></a>Using Annotations/ServletContainerInitializers</h3></div></div></div><p>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:</p><div class="table"><a name="d0e24859"></a><p class="title"><b>Table&nbsp;29.5.&nbsp;Jars Required for Annotations</b></p><div class="table-contents"><table class="table" summary="Jars Required for Annotations" border="1"><colgroup><col class="col_1"><col class="col_2"><col class="col_3"></colgroup><thead><tr><th align="left" valign="top">Jar</th><th align="left" valign="top">Bundle Symbolic Name</th><th align="left" valign="top">Location</th></tr></thead><tbody><tr><td align="left" valign="top"><p>org.ow2.asm:asm-5.0.1.jar</p></td><td align="left" valign="top"><p>org.objectweb.asm</p></td><td align="left" valign="top"><p><a class="link" href="http://central.maven.org/maven2/org/ow2/asm/asm" target="_top">Maven central</a></p></td></tr><tr><td align="left" valign="top"><p>org.ow2.asm:asm-commons-5.0.1.jar</p></td><td align="left" valign="top"><p>org.objectweb.asm.commons</p></td><td align="left" valign="top"><p><a class="link" href="http://central.maven.org/maven2/org/ow2/asm/asm-commons" target="_top">Maven central</a></p></td></tr><tr><td align="left" valign="top"><p>org.ow2.asm:asm-tree-5.0.1.jar</p></td><td align="left" valign="top"><p>org.objectweb.asm.tree</p></td><td align="left" valign="top"><p><a class="link" href="http://central.maven.org/maven2/org/ow2/asm/asm-tree" target="_top">Maven central</a></p></td></tr><tr><td align="left" valign="top"><p>org.apache.aries:org.apache.aries.util-1.0.1.jar</p></td><td align="left" valign="top"><p>org.apache.aries.util</p></td><td align="left" valign="top"><p><a class="link" href="http://central.maven.org/maven2/org/apache/aries/org.apache.aries.util/" target="_top">Maven
central</a></p></td></tr><tr><td align="left" valign="top"><p>org.apache.aries.spifly:org.apache.aries.spifly.dynamic.bundle-1.0.1.jar</p></td><td align="left" valign="top"><p>org.apache.aries.spifly.dynamic.bundle</p></td><td align="left" valign="top"><p><a class="link" href="http://central.maven.org/maven2/org/apache/aries/spifly/org.apache.aries.spifly.dynamic.bundle/" target="_top">Maven
central</a></p></td></tr><tr><td align="left" valign="top"><p>javax.annotation:javax.annotation-api-1.2.jar</p></td><td align="left" valign="top"><p>javax.annotation-api</p></td><td align="left" valign="top"><p><a class="link" href="http://central.maven.org/maven2/javax/annotation/javax.annotation-api/" target="_top">Maven
central</a></p></td></tr><tr><td align="left" valign="top"><p>jta api version 1.1.1 (eg
org.apache.geronimo.specs:geronimo-jta_1.1_spec-1.1.1.jar)<sup>*</sup></p></td><td align="left" valign="top">&nbsp;</td><td align="left" valign="top"><p>Maven
central</p></td></tr><tr><td align="left" valign="top"><p>javax mail api version 1.4.1 (eg
org.eclipse.jetty.orbit:javax.mail.glassfish-1.4.1.v201005082020.jar)<sup>*</sup></p></td><td align="left" valign="top">&nbsp;</td><td align="left" valign="top"><p>Maven central</p></td></tr><tr><td align="left" valign="top"><p>jetty-jndi</p></td><td align="left" valign="top"><p>org.eclipse.jetty.jndi</p></td><td align="left" valign="top"><p>Distribution lib/</p></td></tr><tr><td align="left" valign="top"><p>jetty-plus</p></td><td align="left" valign="top"><p>org.eclipse.jetty.plus</p></td><td align="left" valign="top"><p>Distribution lib/</p></td></tr><tr><td align="left" valign="top"><p>jetty-annotations</p></td><td align="left" valign="top"><p>org.eclipse.jetty.annotations</p></td><td align="left" valign="top"><p>Distribution lib/</p></td></tr></tbody></table></div></div><br class="table-break"><div class="blockquote"><blockquote class="blockquote"><div xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times" class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title"><i class="fa fa-plus" aria-hidden="true"></i> Important</h3><p>If you wish to use JSPs you will need to deploy these annotation-related
jars.</p></div></blockquote></div><div class="blockquote"><blockquote class="blockquote"><div xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times" class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title"><i class="fa fa-asterisk" aria-hidden="true"></i> Note</h3><p>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</p></div></blockquote></div><p>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
<a class="link" href="http://docs.oracle.com/javaee/6/api/javax/servlet/ServletContainerInitializer.html" target="_top">javax.servlet.ServletContainerInitializer</a>.
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
<a class="link" href="http://projects.spring.io/spring-framework/" target="_top">Spring</a>, <a class="link" href="https://jersey.java.net/" target="_top">Jersey</a>
and JSP containers.</p><p>To find ServletContainerInitializers on the classpath, Jetty uses the
Java
<a class="link" href="http://docs.oracle.com/javase/7/docs/api/java/util/ServiceLoader.html" target="_top">ServiceLoader</a>
mechanism. For this to function in OSGi, you will need an OSGi R5
compatible container, and have support for the
<a class="link" href="http://blog.osgi.org/2013/02/javautilserviceloader-in-osgi.html" target="_top">Service
Loader Mediator</a>. Jetty has been tested with
thehttp://aries.apache.org/modules/spi-fly.html[Aries SpiFly]module,
which is the reference implementation of the Service Loader Mediator,
and is listed in the jars above.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_osgi_containers"></a>OSGi Containers</h3></div></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="_felix"></a>Felix</h4></div></div></div><p>The Jetty OSGi integration has been successfully tested against
<a class="link" href="http://felix.apache.org/" target="_top">Felix</a> 5.0.0.</p><p>You will require the following extra Felix services, available as
separately downloadable jars:</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><a class="link" href="http://felix.apache.org/documentation/subprojects/apache-felix-config-admin.html" target="_top">Felix
Configuration Admin Service</a></li><li class="listitem"><a class="link" href="http://felix.apache.org/documentation/subprojects/apache-felix-event-admin.html" target="_top">Felix
Event Admin Service</a></li></ul></div><p>Unfortunately, as of Felix 4.x there is a difficultly with the
resolution of the javax.transaction package.
A <a class="link" href="http://mail-archives.apache.org/mod_mbox/felix-users/201211.mbox/%3CCAPr=90M+5vYjPqAvyTU+gYHr64y_FosBYELeUYcU_rFEJF3Cxw@mail.gmail.com%3E" target="_top">description of the problem</a> and hint to solving it is described [<a class="link" href="http://mail-archives.apache.org/mod_mbox/felix-users/201211.mbox/%3CCAPr=90M+5vYjPqAvyTU+gYHr64y_FosBYELeUYcU_rFEJF3Cxw@mail.gmail.com%3E" target="_top">here</a>].</p><p>The simplest solution for this is to extract the <code class="literal">default.properties</code>
file from the <code class="literal">felix.jar, change the declaration of the javax.sql and
javax.transaction packages</code> and set the changed lines as the value
of the <code class="literal">org.osgi.framework.system.packages</code> property in the
<code class="literal">conf/config.properties</code> file.</p><p>The <code class="literal">default.properties</code> file defines the default
<code class="literal">org.osgi.framework.system.packages</code> property like this:</p><pre xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><code># Default packages exported by system bundle.
org.osgi.framework.system.packages=org.osgi.framework; version=1.7.0, \
org.osgi.framework.hooks.bundle; version=1.1.0, \
org.osgi.framework.hooks.resolver; version=1.0.0, \
org.osgi.framework.hooks.service; version=1.1.0, \
org.osgi.framework.hooks.weaving; version=1.0.0, \
org.osgi.framework.launch; version=1.1.0, \
org.osgi.framework.namespace; version=1.0.0, \
org.osgi.framework.startlevel; version=1.0.0, \
org.osgi.framework.wiring; version=1.1.0, \
org.osgi.resource; version=1.0.0, \
org.osgi.service.packageadmin; version=1.2.0, \
org.osgi.service.startlevel; version=1.1.0, \
org.osgi.service.url; version=1.0.0, \
org.osgi.util.tracker; version=1.5.1 \
${jre-${java.specification.version}}</code></pre><p>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.</p><p>You will take these lines and copy them into the
<code class="literal">conf/config.properties</code> file, after having replaced the line
$\{jre-$\{java.specification.version}} with all of the lines relevant to
your version of the jvm.</p><p>For example, for a 1.7 jvm, you will find this property definition:</p><pre xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><code>jre-1.7=, \
javax.accessibility;uses:="javax.swing.text";version="0.0.0.1_007_JavaSE", \
javax.activation;version="0.0.0.1_007_JavaSE", \
javax.activity;version="0.0.0.1_007_JavaSE", \
javax.annotation.processing;uses:="javax.tools,javax.lang.model,javax.lang.model.element,javax.lang.model.util";version="0.0.0.1_007_JavaSE", \
javax.annotation;version="0.0.0.1_007_JavaSE", \
javax.crypto.interfaces;uses:="javax.crypto.spec,javax.crypto";version="0.0.0.1_007_JavaSE", \
javax.crypto.spec;uses:="javax.crypto";version="0.0.0.1_007_JavaSE", \
javax.crypto;uses:="javax.crypto.spec";version="0.0.0.1_007_JavaSE", \
javax.imageio.event;uses:="javax.imageio";version="0.0.0.1_007_JavaSE", \
javax.imageio.metadata;uses:="org.w3c.dom,javax.imageio";version="0.0.0.1_007_JavaSE", \
javax.imageio.plugins.bmp;uses:="javax.imageio";version="0.0.0.1_007_JavaSE", \
javax.imageio.plugins.jpeg;uses:="javax.imageio";version="0.0.0.1_007_JavaSE", \
javax.imageio.spi;uses:="javax.imageio.stream,javax.imageio,javax.imageio.metadata";version="0.0.0.1_007_JavaSE", \
javax.imageio.stream;uses:="javax.imageio";version="0.0.0.1_007_JavaSE", \
javax.imageio;uses:="javax.imageio.metadata,javax.imageio.stream,javax.imageio.spi,javax.imageio.event";version="0.0.0.1_007_JavaSE", \
javax.jws.soap;version="0.0.0.1_007_JavaSE", \
javax.jws;version="0.0.0.1_007_JavaSE", \
javax.lang.model.element;uses:="javax.lang.model.type,javax.lang.model";version="0.0.0.1_007_JavaSE", \
javax.lang.model.type;uses:="javax.lang.model.element,javax.lang.model";version="0.0.0.1_007_JavaSE", \
javax.lang.model.util;uses:="javax.lang.model,javax.lang.model.element,javax.annotation.processing,javax.lang.model.type";version="0.0.0.1_007_JavaSE", \
javax.lang.model;version="0.0.0.1_007_JavaSE", \
javax.management.loading;uses:="javax.management";version="0.0.0.1_007_JavaSE", \
javax.management.modelmbean;uses:="javax.management,javax.management.loading";version="0.0.0.1_007_JavaSE", \
javax.management.monitor;uses:="javax.management";version="0.0.0.1_007_JavaSE", \
javax.management.openmbean;uses:="javax.management";version="0.0.0.1_007_JavaSE", \
javax.management.relation;uses:="javax.management";version="0.0.0.1_007_JavaSE", \
javax.management.remote.rmi;uses:="javax.management.remote,javax.security.auth,javax.management,javax.management.loading,javax.naming,javax.rmi.ssl,org.omg.CORBA,org.omg.CORBA_2_3.portable,org.omg.CORBA.portable,javax.rmi.CORBA,javax.rmi";version="0.0.0.1_007_JavaSE", \
javax.management.remote;uses:="javax.security.auth,javax.management";version="0.0.0.1_007_JavaSE", \
javax.management.timer;uses:="javax.management";version="0.0.0.1_007_JavaSE", \
javax.management;uses:="javax.management.loading,javax.management.openmbean";version="0.0.0.1_007_JavaSE", \
javax.naming.directory;uses:="javax.naming";version="0.0.0.1_007_JavaSE", \
javax.naming.event;uses:="javax.naming,javax.naming.directory";version="0.0.0.1_007_JavaSE", \
javax.naming.ldap;uses:="javax.naming,javax.naming.directory,javax.net.ssl,javax.naming.event";version="0.0.0.1_007_JavaSE", \
javax.naming.spi;uses:="javax.naming,javax.naming.directory";version="0.0.0.1_007_JavaSE", \
javax.naming;uses:="javax.naming.spi";version="0.0.0.1_007_JavaSE", \
javax.net.ssl;uses:="javax.security.cert,javax.security.auth.x500,javax.net";version="0.0.0.1_007_JavaSE", \
javax.net;version="0.0.0.1_007_JavaSE", \
javax.print.attribute.standard;uses:="javax.print.attribute";version="0.0.0.1_007_JavaSE", \
javax.print.attribute;version="0.0.0.1_007_JavaSE", \
javax.print.event;uses:="javax.print,javax.print.attribute";version="0.0.0.1_007_JavaSE", \
javax.print;uses:="javax.print.attribute,javax.print.event,javax.print.attribute.standard";version="0.0.0.1_007_JavaSE", \
javax.rmi.CORBA;uses:="org.omg.CORBA,org.omg.CORBA_2_3.portable,org.omg.CORBA.portable,org.omg.SendingContext";version="0.0.0.1_007_JavaSE", \
javax.rmi.ssl;uses:="javax.net,javax.net.ssl";version="0.0.0.1_007_JavaSE", \
javax.rmi;uses:="org.omg.CORBA,javax.rmi.CORBA";version="0.0.0.1_007_JavaSE", \
javax.script;version="0.0.0.1_007_JavaSE", \
javax.security.auth.callback;version="0.0.0.1_007_JavaSE", \
javax.security.auth.kerberos;uses:="javax.security.auth,javax.crypto";version="0.0.0.1_007_JavaSE", \
javax.security.auth.login;uses:="javax.security.auth,javax.security.auth.callback";version="0.0.0.1_007_JavaSE", \
javax.security.auth.spi;uses:="javax.security.auth.callback,javax.security.auth.login,javax.security.auth";version="0.0.0.1_007_JavaSE", \
javax.security.auth.x500;uses:="javax.security.auth";version="0.0.0.1_007_JavaSE", \
javax.security.auth;version="0.0.0.1_007_JavaSE", \
javax.security.cert;version="0.0.0.1_007_JavaSE", \
javax.security.sasl;uses:="javax.security.auth.callback";version="0.0.0.1_007_JavaSE", \
javax.sound.midi.spi;uses:="javax.sound.midi";version="0.0.0.1_007_JavaSE", \
javax.sound.midi;uses:="javax.sound.midi.spi";version="0.0.0.1_007_JavaSE", \
javax.sound.sampled.spi;uses:="javax.sound.sampled";version="0.0.0.1_007_JavaSE", \
javax.sound.sampled;uses:="javax.sound.sampled.spi";version="0.0.0.1_007_JavaSE", \
javax.sql.rowset.serial;uses:="javax.sql.rowset";version="0.0.0.1_007_JavaSE", \
javax.sql.rowset.spi;uses:="javax.sql,javax.naming,javax.sql.rowset";version="0.0.0.1_007_JavaSE", \
javax.sql.rowset;uses:="javax.sql,javax.sql.rowset.serial,javax.sql.rowset.spi";version="0.0.0.1_007_JavaSE", \
javax.sql;uses:="javax.transaction.xa";version="0.0.0.1_007_JavaSE", \
javax.swing.border;uses:="javax.swing";version="0.0.0.1_007_JavaSE", \
javax.swing.colorchooser;uses:="javax.swing,javax.swing.border,javax.swing.event,javax.swing.text";version="0.0.0.1_007_JavaSE", \
javax.swing.event;uses:="javax.swing,javax.swing.text,javax.swing.table,javax.swing.tree,javax.swing.undo";version="0.0.0.1_007_JavaSE", \
javax.swing.filechooser;uses:="javax.swing";version="0.0.0.1_007_JavaSE", \
javax.swing.plaf.basic;uses:="javax.swing.border,javax.swing,javax.swing.plaf,javax.swing.text,javax.swing.event,javax.swing.colorchooser,javax.accessibility,javax.swing.filechooser,javax.swing.text.html,javax.sound.sampled,javax.swing.table,javax.swing.plaf.synth,javax.swing.tree";version="0.0.0.1_007_JavaSE", \
javax.swing.plaf.metal;uses:="javax.swing.plaf,javax.swing,javax.swing.border,javax.swing.text,javax.swing.plaf.basic,javax.swing.filechooser,javax.swing.event,javax.swing.tree";version="0.0.0.1_007_JavaSE", \
javax.swing.plaf.multi;uses:="javax.accessibility,javax.swing,javax.swing.plaf,javax.swing.filechooser,javax.swing.text,javax.swing.tree";version="0.0.0.1_007_JavaSE", \
javax.swing.plaf.nimbus;uses:="javax.swing,javax.swing.plaf,javax.swing.border,javax.swing.plaf.synth";version="0.0.0.1_007_JavaSE", \
javax.swing.plaf.synth;uses:="javax.swing,javax.swing.plaf,javax.swing.text,javax.swing.border,javax.swing.plaf.basic,javax.swing.colorchooser,javax.swing.event,javax.xml.parsers,org.xml.sax,org.xml.sax.helpers,javax.swing.table,javax.swing.tree";version="0.0.0.1_007_JavaSE", \
javax.swing.plaf;uses:="javax.swing,javax.swing.border,javax.accessibility,javax.swing.filechooser,javax.swing.text,javax.swing.tree";version="0.0.0.1_007_JavaSE", \
javax.swing.table;uses:="javax.swing.event,javax.swing.plaf,javax.swing.border,javax.swing,javax.accessibility";version="0.0.0.1_007_JavaSE", \
javax.swing.text.html.parser;uses:="javax.swing.text,javax.swing.text.html";version="0.0.0.1_007_JavaSE", \
javax.swing.text.html;uses:="javax.swing.event,javax.swing.text,javax.accessibility,javax.swing,javax.swing.plaf,javax.swing.border,javax.swing.undo";version="0.0.0.1_007_JavaSE", \
javax.swing.text.rtf;uses:="javax.swing.text";version="0.0.0.1_007_JavaSE", \
javax.swing.text;uses:="javax.swing.event,javax.swing.tree,javax.swing.undo,javax.swing,javax.swing.plaf,javax.swing.plaf.basic,javax.print,javax.print.attribute,javax.accessibility,javax.swing.text.html";version="0.0.0.1_007_JavaSE", \
javax.swing.tree;uses:="javax.swing.event,javax.swing,javax.swing.border,javax.swing.plaf,javax.swing.plaf.basic";version="0.0.0.1_007_JavaSE", \
javax.swing.undo;uses:="javax.swing,javax.swing.event";version="0.0.0.1_007_JavaSE", \
javax.swing;uses:="javax.swing.event,javax.accessibility,javax.swing.text,javax.swing.plaf,javax.swing.border,javax.swing.tree,javax.swing.table,javax.swing.colorchooser,javax.swing.plaf.basic,javax.swing.text.html,javax.swing.filechooser,javax.print,javax.print.attribute,javax.swing.plaf.metal";version="0.0.0.1_007_JavaSE", \
javax.tools;uses:="javax.lang.model.element,javax.annotation.processing,javax.lang.model";version="0.0.0.1_007_JavaSE", \
javax.transaction.xa;version="0.0.0.1_007_JavaSE", \
javax.transaction;version="0.0.0.1_007_JavaSE", \
javax.xml.bind.annotation.adapters;uses:="javax.xml.bind";version="0.0.0.1_007_JavaSE", \
javax.xml.bind.annotation;uses:="javax.xml.transform,javax.xml.bind,javax.xml.parsers,javax.xml.transform.dom,org.w3c.dom";version="0.0.0.1_007_JavaSE", \
javax.xml.bind.attachment;uses:="javax.activation";version="0.0.0.1_007_JavaSE", \
javax.xml.bind.helpers;uses:="javax.xml.bind.annotation.adapters,javax.xml.transform.dom,org.w3c.dom,org.xml.sax,javax.xml.bind.attachment,javax.xml.stream,javax.xml.transform,javax.xml.transform.stream,javax.xml.validation,javax.xml.transform.sax,javax.xml.bind,javax.xml.parsers";version="0.0.0.1_007_JavaSE", \
javax.xml.bind.util;uses:="javax.xml.transform.sax,javax.xml.bind,org.xml.sax,org.xml.sax.ext,org.xml.sax.helpers";version="0.0.0.1_007_JavaSE", \
javax.xml.bind;uses:="javax.xml.validation,javax.xml.namespace,javax.xml.datatype,javax.xml.transform,javax.xml.bind.annotation,javax.xml.transform.stream,org.w3c.dom,javax.xml.bind.attachment,javax.xml.stream,javax.xml.bind.annotation.adapters,org.xml.sax";version="0.0.0.1_007_JavaSE", \
javax.xml.crypto.dom;uses:="javax.xml.crypto,org.w3c.dom";version="0.0.0.1_007_JavaSE", \
javax.xml.crypto.dsig.dom;uses:="javax.xml.crypto.dsig,javax.xml.crypto,org.w3c.dom,javax.xml.crypto.dom";version="0.0.0.1_007_JavaSE", \
javax.xml.crypto.dsig.keyinfo;uses:="javax.xml.crypto";version="0.0.0.1_007_JavaSE", \
javax.xml.crypto.dsig.spec;uses:="javax.xml.crypto";version="0.0.0.1_007_JavaSE", \
javax.xml.crypto.dsig;uses:="javax.xml.crypto,javax.xml.crypto.dsig.spec,javax.xml.crypto.dsig.keyinfo";version="0.0.0.1_007_JavaSE", \
javax.xml.crypto;uses:="javax.xml.crypto.dsig.keyinfo";version="0.0.0.1_007_JavaSE", \
javax.xml.datatype;uses:="javax.xml.namespace";version="0.0.0.1_007_JavaSE", \
javax.xml.namespace;version="0.0.0.1_007_JavaSE", \
javax.xml.parsers;uses:="javax.xml.validation,org.w3c.dom,org.xml.sax,org.xml.sax.helpers";version="0.0.0.1_007_JavaSE", \
javax.xml.soap;uses:="javax.activation,javax.xml.namespace,org.w3c.dom,javax.xml.transform.dom,javax.xml.transform";version="0.0.0.1_007_JavaSE", \
javax.xml.stream.events;uses:="javax.xml.namespace,javax.xml.stream";version="0.0.0.1_007_JavaSE", \
javax.xml.stream.util;uses:="javax.xml.stream,javax.xml.stream.events,javax.xml.namespace";version="0.0.0.1_007_JavaSE", \
javax.xml.stream;uses:="javax.xml.stream.events,javax.xml.namespace,javax.xml.stream.util,javax.xml.transform";version="0.0.0.1_007_JavaSE", \
javax.xml.transform.dom;uses:="javax.xml.transform,org.w3c.dom";version="0.0.0.1_007_JavaSE", \
javax.xml.transform.sax;uses:="org.xml.sax.ext,javax.xml.transform,org.xml.sax,javax.xml.transform.stream";version="0.0.0.1_007_JavaSE", \
javax.xml.transform.stax;uses:="javax.xml.stream,javax.xml.transform,javax.xml.stream.events";version="0.0.0.1_007_JavaSE", \
javax.xml.transform.stream;uses:="javax.xml.transform";version="0.0.0.1_007_JavaSE", \
javax.xml.transform;version="0.0.0.1_007_JavaSE", \
javax.xml.validation;uses:="org.w3c.dom.ls,javax.xml.transform,javax.xml.transform.stream,org.xml.sax,org.w3c.dom";version="0.0.0.1_007_JavaSE", \
javax.xml.ws.handler.soap;uses:="javax.xml.ws.handler,javax.xml.namespace,javax.xml.soap,javax.xml.bind";version="0.0.0.1_007_JavaSE", \
javax.xml.ws.handler;uses:="javax.xml.ws,javax.xml.namespace";version="0.0.0.1_007_JavaSE", \
javax.xml.ws.http;uses:="javax.xml.ws";version="0.0.0.1_007_JavaSE", \
javax.xml.ws.soap;uses:="javax.xml.ws.spi,javax.xml.ws,javax.xml.soap";version="0.0.0.1_007_JavaSE", \
javax.xml.ws.spi.http;version="0.0.0.1_007_JavaSE", \
javax.xml.ws.spi;uses:="javax.xml.ws,javax.xml.ws.wsaddressing,javax.xml.transform,org.w3c.dom,javax.xml.namespace,javax.xml.ws.handler,javax.xml.bind";version="0.0.0.1_007_JavaSE", \
javax.xml.ws.wsaddressing;uses:="javax.xml.bind.annotation,javax.xml.namespace,org.w3c.dom,javax.xml.transform,javax.xml.bind,javax.xml.ws,javax.xml.ws.spi";version="0.0.0.1_007_JavaSE", \
javax.xml.ws;uses:="javax.xml.ws.handler,javax.xml.ws.spi,javax.xml.ws.spi.http,javax.xml.transform,org.w3c.dom,javax.xml.bind.annotation,javax.xml.transform.stream,javax.xml.bind,javax.xml.namespace";version="0.0.0.1_007_JavaSE", \
javax.xml.xpath;uses:="org.xml.sax,javax.xml.namespace";version="0.0.0.1_007_JavaSE", \
javax.xml;version="0.0.0.1_007_JavaSE", \
org.ietf.jgss;version="0.0.0.1_007_JavaSE", \
org.omg.CORBA.DynAnyPackage;uses:="org.omg.CORBA";version="0.0.0.1_007_JavaSE", \
org.omg.CORBA.ORBPackage;uses:="org.omg.CORBA";version="0.0.0.1_007_JavaSE", \
org.omg.CORBA.TypeCodePackage;uses:="org.omg.CORBA";version="0.0.0.1_007_JavaSE", \
org.omg.CORBA.portable;uses:="org.omg.CORBA,org.omg.CORBA_2_3.portable";version="0.0.0.1_007_JavaSE", \
org.omg.CORBA;uses:="org.omg.CORBA.portable,org.omg.CORBA.DynAnyPackage,org.omg.CORBA.ORBPackage,org.omg.CORBA_2_3.portable,org.omg.CORBA.TypeCodePackage";version="0.0.0.1_007_JavaSE", \
org.omg.CORBA_2_3.portable;uses:="org.omg.CORBA,org.omg.CORBA.portable";version="0.0.0.1_007_JavaSE", \
org.omg.CORBA_2_3;uses:="org.omg.CORBA,org.omg.CORBA.portable";version="0.0.0.1_007_JavaSE", \
org.omg.CosNaming.NamingContextExtPackage;uses:="org.omg.CORBA,org.omg.CORBA.portable";version="0.0.0.1_007_JavaSE", \
org.omg.CosNaming.NamingContextPackage;uses:="org.omg.CORBA,org.omg.CORBA.portable,org.omg.CosNaming";version="0.0.0.1_007_JavaSE", \
org.omg.CosNaming;uses:="org.omg.CORBA.portable,org.omg.CORBA,org.omg.PortableServer,org.omg.CosNaming.NamingContextPackage,org.omg.CosNaming.NamingContextExtPackage";version="0.0.0.1_007_JavaSE", \
org.omg.Dynamic;uses:="org.omg.CORBA,org.omg.CORBA.portable";version="0.0.0.1_007_JavaSE", \
org.omg.DynamicAny.DynAnyFactoryPackage;uses:="org.omg.CORBA,org.omg.CORBA.portable";version="0.0.0.1_007_JavaSE", \
org.omg.DynamicAny.DynAnyPackage;uses:="org.omg.CORBA,org.omg.CORBA.portable";version="0.0.0.1_007_JavaSE", \
org.omg.DynamicAny;uses:="org.omg.CORBA,org.omg.CORBA.portable,org.omg.DynamicAny.DynAnyFactoryPackage,org.omg.DynamicAny.DynAnyPackage";version="0.0.0.1_007_JavaSE", \
org.omg.IOP.CodecFactoryPackage;uses:="org.omg.CORBA,org.omg.CORBA.portable";version="0.0.0.1_007_JavaSE", \
org.omg.IOP.CodecPackage;uses:="org.omg.CORBA,org.omg.CORBA.portable";version="0.0.0.1_007_JavaSE", \
org.omg.IOP;uses:="org.omg.CORBA,org.omg.CORBA.portable,org.omg.IOP.CodecFactoryPackage,org.omg.IOP.CodecPackage";version="0.0.0.1_007_JavaSE", \
org.omg.Messaging;uses:="org.omg.CORBA,org.omg.CORBA.portable";version="0.0.0.1_007_JavaSE", \
org.omg.PortableInterceptor.ORBInitInfoPackage;uses:="org.omg.CORBA,org.omg.CORBA.portable";version="0.0.0.1_007_JavaSE", \
org.omg.PortableInterceptor;uses:="org.omg.CORBA,org.omg.CORBA.portable,org.omg.IOP,org.omg.PortableInterceptor.ORBInitInfoPackage,org.omg.CORBA_2_3.portable,org.omg.Dynamic";version="0.0.0.1_007_JavaSE", \
org.omg.PortableServer.CurrentPackage;uses:="org.omg.CORBA,org.omg.CORBA.portable";version="0.0.0.1_007_JavaSE", \
org.omg.PortableServer.POAManagerPackage;uses:="org.omg.CORBA,org.omg.CORBA.portable";version="0.0.0.1_007_JavaSE", \
org.omg.PortableServer.POAPackage;uses:="org.omg.CORBA,org.omg.CORBA.portable";version="0.0.0.1_007_JavaSE", \
org.omg.PortableServer.ServantLocatorPackage;uses:="org.omg.CORBA,org.omg.CORBA.portable";version="0.0.0.1_007_JavaSE", \
org.omg.PortableServer.portable;uses:="org.omg.CORBA,org.omg.PortableServer";version="0.0.0.1_007_JavaSE", \
org.omg.PortableServer;uses:="org.omg.CORBA,org.omg.CORBA.portable,org.omg.PortableServer.CurrentPackage,org.omg.PortableServer.POAManagerPackage,org.omg.PortableServer.POAPackage,org.omg.PortableServer.portable,org.omg.CORBA_2_3,org.omg.PortableServer.ServantLocatorPackage";version="0.0.0.1_007_JavaSE", \
org.omg.SendingContext;uses:="org.omg.CORBA,org.omg.CORBA.portable";version="0.0.0.1_007_JavaSE", \
org.omg.stub.java.rmi;uses:="javax.rmi.CORBA";version="0.0.0.1_007_JavaSE", \
org.w3c.dom.bootstrap;uses:="org.w3c.dom";version="0.0.0.1_007_JavaSE", \
org.w3c.dom.events;uses:="org.w3c.dom,org.w3c.dom.views";version="0.0.0.1_007_JavaSE", \
org.w3c.dom.ls;uses:="org.w3c.dom,org.w3c.dom.events,org.w3c.dom.traversal";version="0.0.0.1_007_JavaSE", \
org.w3c.dom;version="0.0.0.1_007_JavaSE", \
org.xml.sax.ext;uses:="org.xml.sax,org.xml.sax.helpers";version="0.0.0.1_007_JavaSE", \
org.xml.sax.helpers;uses:="org.xml.sax";version="0.0.0.1_007_JavaSE", \
org.xml.sax;version="0.0.0.1_007_JavaSE"</code></pre><p>Remove the definition for the <code class="literal">javax.transaction</code> packages, and remove
the <code class="literal">uses:=</code> clause for the <code class="literal">javax.sql</code> packages (but leaving the
<code class="literal">version</code> clause). Concatenate all the lines together. You&#8217;ll wind up
with something like this in your <code class="literal">conf/config.properties</code> file:</p><pre xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><code>org.osgi.framework.system.packages=org.osgi.framework;version=1.7.0, org.osgi.framework.hooks.bundle;version=1.1.0, org.osgi.framework.hooks.resolver;version=1.0.0, org.osgi.framework.hooks.service;version=1.1.0, org.osgi.framework.hooks.weaving;version=1.0.0, org.osgi.framework.launch;version=1.1.0, org.osgi.framework.namespace;version=1.0.0, org.osgi.framework.startlevel;version=1.0.0, org.osgi.framework.wiring;version=1.1.0, org.osgi.resource;version=1.0.0, org.osgi.service.packageadmin; version=1.2.0, org.osgi.service.startlevel; version=1.1.0, org.osgi.service.url;version=1.0.0, org.osgi.util.tracker;version=1.5.1 javax.accessibility;uses:="javax.swing.text";version="0.0.0.1_007_JavaSE", javax.activation;version="0.0.0.1_007_JavaSE", javax.activity;version="0.0.0.1_007_JavaSE", javax.annotation.processing;uses:="javax.tools,javax.lang.model,javax.lang.model.element,javax.lang.model.util";version="0.0.0.1_007_JavaSE", javax.annotation;version="0.0.0.1_007_JavaSE", javax.crypto.interfaces;uses:="javax.crypto.spec,javax.crypto";version="0.0.0.1_007_JavaSE", javax.crypto.spec;uses:="javax.crypto";version="0.0.0.1_007_JavaSE", javax.crypto;uses:="javax.crypto.spec";version="0.0.0.1_007_JavaSE", javax.imageio.event;uses:="javax.imageio";version="0.0.0.1_007_JavaSE", javax.imageio.metadata;uses:="org.w3c.dom,javax.imageio";version="0.0.0.1_007_JavaSE", javax.imageio.plugins.bmp;uses:="javax.imageio";version="0.0.0.1_007_JavaSE", javax.imageio.plugins.jpeg;uses:="javax.imageio";version="0.0.0.1_007_JavaSE", javax.imageio.spi;uses:="javax.imageio.stream,javax.imageio,javax.imageio.metadata";version="0.0.0.1_007_JavaSE", javax.imageio.stream;uses:="javax.imageio";version="0.0.0.1_007_JavaSE", javax.imageio;uses:="javax.imageio.metadata,javax.imageio.stream,javax.imageio.spi,javax.imageio.event";version="0.0.0.1_007_JavaSE", javax.jws.soap;version="0.0.0.1_007_JavaSE", javax.jws;version="0.0.0.1_007_JavaSE", javax.lang.model.element;uses:="javax.lang.model.type,javax.lang.model";version="0.0.0.1_007_JavaSE", javax.lang.model.type;uses:="javax.lang.model.element,javax.lang.model";version="0.0.0.1_007_JavaSE", javax.lang.model.util;uses:="javax.lang.model,javax.lang.model.element,javax.annotation.processing,javax.lang.model.type";version="0.0.0.1_007_JavaSE", javax.lang.model;version="0.0.0.1_007_JavaSE", javax.management.loading;uses:="javax.management";version="0.0.0.1_007_JavaSE", javax.management.modelmbean;uses:="javax.management,javax.management.loading";version="0.0.0.1_007_JavaSE", javax.management.monitor;uses:="javax.management";version="0.0.0.1_007_JavaSE", javax.management.openmbean;uses:="javax.management";version="0.0.0.1_007_JavaSE", javax.management.relation;uses:="javax.management";version="0.0.0.1_007_JavaSE", javax.management.remote.rmi;uses:="javax.management.remote,javax.security.auth,javax.management,javax.management.loading,javax.naming,javax.rmi.ssl,org.omg.CORBA,org.omg.CORBA_2_3.portable,org.omg.CORBA.portable,javax.rmi.CORBA,javax.rmi";version="0.0.0.1_007_JavaSE", javax.management.remote;uses:="javax.security.auth,javax.management";version="0.0.0.1_007_JavaSE", javax.management.timer;uses:="javax.management";version="0.0.0.1_007_JavaSE", javax.management;uses:="javax.management.loading,javax.management.openmbean";version="0.0.0.1_007_JavaSE", javax.naming.directory;uses:="javax.naming";version="0.0.0.1_007_JavaSE", javax.naming.event;uses:="javax.naming,javax.naming.directory";version="0.0.0.1_007_JavaSE", javax.naming.ldap;uses:="javax.naming,javax.naming.directory,javax.net.ssl,javax.naming.event";version="0.0.0.1_007_JavaSE", javax.naming.spi;uses:="javax.naming,javax.naming.directory";version="0.0.0.1_007_JavaSE", javax.naming;uses:="javax.naming.spi";version="0.0.0.1_007_JavaSE", javax.net.ssl;uses:="javax.security.cert,javax.security.auth.x500,javax.net";version="0.0.0.1_007_JavaSE", javax.net;version="0.0.0.1_007_JavaSE", javax.print.attribute.standard;uses:="javax.print.attribute";version="0.0.0.1_007_JavaSE", javax.print.attribute;version="0.0.0.1_007_JavaSE", javax.print.event;uses:="javax.print,javax.print.attribute";version="0.0.0.1_007_JavaSE", javax.print;uses:="javax.print.attribute,javax.print.event,javax.print.attribute.standard";version="0.0.0.1_007_JavaSE", javax.rmi.CORBA;uses:="org.omg.CORBA,org.omg.CORBA_2_3.portable,org.omg.CORBA.portable,org.omg.SendingContext";version="0.0.0.1_007_JavaSE", javax.rmi.ssl;uses:="javax.net,javax.net.ssl";version="0.0.0.1_007_JavaSE", javax.rmi;uses:="org.omg.CORBA,javax.rmi.CORBA";version="0.0.0.1_007_JavaSE", javax.script;version="0.0.0.1_007_JavaSE", javax.security.auth.callback;version="0.0.0.1_007_JavaSE", javax.security.auth.kerberos;uses:="javax.security.auth,javax.crypto";version="0.0.0.1_007_JavaSE", javax.security.auth.login;uses:="javax.security.auth,javax.security.auth.callback";version="0.0.0.1_007_JavaSE", javax.security.auth.spi;uses:="javax.security.auth.callback,javax.security.auth.login,javax.security.auth";version="0.0.0.1_007_JavaSE", javax.security.auth.x500;uses:="javax.security.auth";version="0.0.0.1_007_JavaSE", javax.security.auth;version="0.0.0.1_007_JavaSE", javax.security.cert;version="0.0.0.1_007_JavaSE", javax.security.sasl;uses:="javax.security.auth.callback";version="0.0.0.1_007_JavaSE", javax.sound.midi.spi;uses:="javax.sound.midi";version="0.0.0.1_007_JavaSE", javax.sound.midi;uses:="javax.sound.midi.spi";version="0.0.0.1_007_JavaSE", javax.sound.sampled.spi;uses:="javax.sound.sampled";version="0.0.0.1_007_JavaSE", javax.sound.sampled;uses:="javax.sound.sampled.spi";version="0.0.0.1_007_JavaSE", javax.sql.rowset.serial;version="0.0.0.1_007_JavaSE", javax.sql.rowset.spi;version="0.0.0.1_007_JavaSE", javax.sql.rowset;version="0.0.0.1_007_JavaSE", javax.sql;version="0.0.0.1_007_JavaSE", javax.swing.border;uses:="javax.swing";version="0.0.0.1_007_JavaSE", javax.swing.colorchooser;uses:="javax.swing,javax.swing.border,javax.swing.event,javax.swing.text";version="0.0.0.1_007_JavaSE", javax.swing.event;uses:="javax.swing,javax.swing.text,javax.swing.table,javax.swing.tree,javax.swing.undo";version="0.0.0.1_007_JavaSE", javax.swing.filechooser;uses:="javax.swing";version="0.0.0.1_007_JavaSE", javax.swing.plaf.basic;uses:="javax.swing.border,javax.swing,javax.swing.plaf,javax.swing.text,javax.swing.event,javax.swing.colorchooser,javax.accessibility,javax.swing.filechooser,javax.swing.text.html,javax.sound.sampled,javax.swing.table,javax.swing.plaf.synth,javax.swing.tree";version="0.0.0.1_007_JavaSE", javax.swing.plaf.metal;uses:="javax.swing.plaf,javax.swing,javax.swing.border,javax.swing.text,javax.swing.plaf.basic,javax.swing.filechooser,javax.swing.event,javax.swing.tree";version="0.0.0.1_007_JavaSE", javax.swing.plaf.multi;uses:="javax.accessibility,javax.swing,javax.swing.plaf,javax.swing.filechooser,javax.swing.text,javax.swing.tree";version="0.0.0.1_007_JavaSE", javax.swing.plaf.nimbus;uses:="javax.swing,javax.swing.plaf,javax.swing.border,javax.swing.plaf.synth";version="0.0.0.1_007_JavaSE", javax.swing.plaf.synth;uses:="javax.swing,javax.swing.plaf,javax.swing.text,javax.swing.border,javax.swing.plaf.basic,javax.swing.colorchooser,javax.swing.event,javax.xml.parsers,org.xml.sax,org.xml.sax.helpers,javax.swing.table,javax.swing.tree";version="0.0.0.1_007_JavaSE", javax.swing.plaf;uses:="javax.swing,javax.swing.border,javax.accessibility,javax.swing.filechooser,javax.swing.text,javax.swing.tree";version="0.0.0.1_007_JavaSE", javax.swing.table;uses:="javax.swing.event,javax.swing.plaf,javax.swing.border,javax.swing,javax.accessibility";version="0.0.0.1_007_JavaSE", javax.swing.text.html.parser;uses:="javax.swing.text,javax.swing.text.html";version="0.0.0.1_007_JavaSE", javax.swing.text.html;uses:="javax.swing.event,javax.swing.text,javax.accessibility,javax.swing,javax.swing.plaf,javax.swing.border,javax.swing.undo";version="0.0.0.1_007_JavaSE", javax.swing.text.rtf;uses:="javax.swing.text";version="0.0.0.1_007_JavaSE", javax.swing.text;uses:="javax.swing.event,javax.swing.tree,javax.swing.undo,javax.swing,javax.swing.plaf,javax.swing.plaf.basic,javax.print,javax.print.attribute,javax.accessibility,javax.swing.text.html";version="0.0.0.1_007_JavaSE", javax.swing.tree;uses:="javax.swing.event,javax.swing,javax.swing.border,javax.swing.plaf,javax.swing.plaf.basic";version="0.0.0.1_007_JavaSE", javax.swing.undo;uses:="javax.swing,javax.swing.event";version="0.0.0.1_007_JavaSE", javax.swing;uses:="javax.swing.event,javax.accessibility,javax.swing.text,javax.swing.plaf,javax.swing.border,javax.swing.tree,javax.swing.table,javax.swing.colorchooser,javax.swing.plaf.basic,javax.swing.text.html,javax.swing.filechooser,javax.print,javax.print.attribute,javax.swing.plaf.metal";version="0.0.0.1_007_JavaSE", javax.tools;uses:="javax.lang.model.element,javax.annotation.processing,javax.lang.model";version="0.0.0.1_007_JavaSE", javax.xml.bind.annotation.adapters;uses:="javax.xml.bind";version="0.0.0.1_007_JavaSE", javax.xml.bind.annotation;uses:="javax.xml.transform,javax.xml.bind,javax.xml.parsers,javax.xml.transform.dom,org.w3c.dom";version="0.0.0.1_007_JavaSE", javax.xml.bind.attachment;uses:="javax.activation";version="0.0.0.1_007_JavaSE", javax.xml.bind.helpers;uses:="javax.xml.bind.annotation.adapters,javax.xml.transform.dom,org.w3c.dom,org.xml.sax,javax.xml.bind.attachment,javax.xml.stream,javax.xml.transform,javax.xml.transform.stream,javax.xml.validation,javax.xml.transform.sax,javax.xml.bind,javax.xml.parsers";version="0.0.0.1_007_JavaSE", javax.xml.bind.util;uses:="javax.xml.transform.sax,javax.xml.bind,org.xml.sax,org.xml.sax.ext,org.xml.sax.helpers";version="0.0.0.1_007_JavaSE", javax.xml.bind;uses:="javax.xml.validation,javax.xml.namespace,javax.xml.datatype,javax.xml.transform,javax.xml.bind.annotation,javax.xml.transform.stream,org.w3c.dom,javax.xml.bind.attachment,javax.xml.stream,javax.xml.bind.annotation.adapters,org.xml.sax";version="0.0.0.1_007_JavaSE", javax.xml.crypto.dom;uses:="javax.xml.crypto,org.w3c.dom";version="0.0.0.1_007_JavaSE", javax.xml.crypto.dsig.dom;uses:="javax.xml.crypto.dsig,javax.xml.crypto,org.w3c.dom,javax.xml.crypto.dom";version="0.0.0.1_007_JavaSE", javax.xml.crypto.dsig.keyinfo;uses:="javax.xml.crypto";version="0.0.0.1_007_JavaSE", javax.xml.crypto.dsig.spec;uses:="javax.xml.crypto";version="0.0.0.1_007_JavaSE", javax.xml.crypto.dsig;uses:="javax.xml.crypto,javax.xml.crypto.dsig.spec,javax.xml.crypto.dsig.keyinfo";version="0.0.0.1_007_JavaSE", javax.xml.crypto;uses:="javax.xml.crypto.dsig.keyinfo";version="0.0.0.1_007_JavaSE", javax.xml.datatype;uses:="javax.xml.namespace";version="0.0.0.1_007_JavaSE", javax.xml.namespace;version="0.0.0.1_007_JavaSE", javax.xml.parsers;uses:="javax.xml.validation,org.w3c.dom,org.xml.sax,org.xml.sax.helpers";version="0.0.0.1_007_JavaSE", javax.xml.soap;uses:="javax.activation,javax.xml.namespace,org.w3c.dom,javax.xml.transform.dom,javax.xml.transform";version="0.0.0.1_007_JavaSE", javax.xml.stream.events;uses:="javax.xml.namespace,javax.xml.stream";version="0.0.0.1_007_JavaSE", javax.xml.stream.util;uses:="javax.xml.stream,javax.xml.stream.events,javax.xml.namespace";version="0.0.0.1_007_JavaSE", javax.xml.stream;uses:="javax.xml.stream.events,javax.xml.namespace,javax.xml.stream.util,javax.xml.transform";version="0.0.0.1_007_JavaSE", javax.xml.transform.dom;uses:="javax.xml.transform,org.w3c.dom";version="0.0.0.1_007_JavaSE", javax.xml.transform.sax;uses:="org.xml.sax.ext,javax.xml.transform,org.xml.sax,javax.xml.transform.stream";version="0.0.0.1_007_JavaSE", javax.xml.transform.stax;uses:="javax.xml.stream,javax.xml.transform,javax.xml.stream.events";version="0.0.0.1_007_JavaSE", javax.xml.transform.stream;uses:="javax.xml.transform";version="0.0.0.1_007_JavaSE", javax.xml.transform;version="0.0.0.1_007_JavaSE", javax.xml.validation;uses:="org.w3c.dom.ls,javax.xml.transform,javax.xml.transform.stream,org.xml.sax,org.w3c.dom";version="0.0.0.1_007_JavaSE", javax.xml.ws.handler.soap;uses:="javax.xml.ws.handler,javax.xml.namespace,javax.xml.soap,javax.xml.bind";version="0.0.0.1_007_JavaSE", javax.xml.ws.handler;uses:="javax.xml.ws,javax.xml.namespace";version="0.0.0.1_007_JavaSE", javax.xml.ws.http;uses:="javax.xml.ws";version="0.0.0.1_007_JavaSE", javax.xml.ws.soap;uses:="javax.xml.ws.spi,javax.xml.ws,javax.xml.soap";version="0.0.0.1_007_JavaSE", javax.xml.ws.spi.http;version="0.0.0.1_007_JavaSE", javax.xml.ws.spi;uses:="javax.xml.ws,javax.xml.ws.wsaddressing,javax.xml.transform,org.w3c.dom,javax.xml.namespace,javax.xml.ws.handler,javax.xml.bind";version="0.0.0.1_007_JavaSE", javax.xml.ws.wsaddressing;uses:="javax.xml.bind.annotation,javax.xml.namespace,org.w3c.dom,javax.xml.transform,javax.xml.bind,javax.xml.ws,javax.xml.ws.spi";version="0.0.0.1_007_JavaSE", javax.xml.ws;uses:="javax.xml.ws.handler,javax.xml.ws.spi,javax.xml.ws.spi.http,javax.xml.transform,org.w3c.dom,javax.xml.bind.annotation,javax.xml.transform.stream,javax.xml.bind,javax.xml.namespace";version="0.0.0.1_007_JavaSE", javax.xml.xpath;uses:="org.xml.sax,javax.xml.namespace";version="0.0.0.1_007_JavaSE", javax.xml;version="0.0.0.1_007_JavaSE", org.ietf.jgss;version="0.0.0.1_007_JavaSE", org.omg.CORBA.DynAnyPackage;uses:="org.omg.CORBA";version="0.0.0.1_007_JavaSE", org.omg.CORBA.ORBPackage;uses:="org.omg.CORBA";version="0.0.0.1_007_JavaSE", org.omg.CORBA.TypeCodePackage;uses:="org.omg.CORBA";version="0.0.0.1_007_JavaSE", org.omg.CORBA.portable;uses:="org.omg.CORBA,org.omg.CORBA_2_3.portable";version="0.0.0.1_007_JavaSE", org.omg.CORBA;uses:="org.omg.CORBA.portable,org.omg.CORBA.DynAnyPackage,org.omg.CORBA.ORBPackage,org.omg.CORBA_2_3.portable,org.omg.CORBA.TypeCodePackage";version="0.0.0.1_007_JavaSE", org.omg.CORBA_2_3.portable;uses:="org.omg.CORBA,org.omg.CORBA.portable";version="0.0.0.1_007_JavaSE", org.omg.CORBA_2_3;uses:="org.omg.CORBA,org.omg.CORBA.portable";version="0.0.0.1_007_JavaSE", org.omg.CosNaming.NamingContextExtPackage;uses:="org.omg.CORBA,org.omg.CORBA.portable";version="0.0.0.1_007_JavaSE", org.omg.CosNaming.NamingContextPackage;uses:="org.omg.CORBA,org.omg.CORBA.portable,org.omg.CosNaming";version="0.0.0.1_007_JavaSE", org.omg.CosNaming;uses:="org.omg.CORBA.portable,org.omg.CORBA,org.omg.PortableServer,org.omg.CosNaming.NamingContextPackage,org.omg.CosNaming.NamingContextExtPackage";version="0.0.0.1_007_JavaSE", org.omg.Dynamic;uses:="org.omg.CORBA,org.omg.CORBA.portable";version="0.0.0.1_007_JavaSE", org.omg.DynamicAny.DynAnyFactoryPackage;uses:="org.omg.CORBA,org.omg.CORBA.portable";version="0.0.0.1_007_JavaSE", org.omg.DynamicAny.DynAnyPackage;uses:="org.omg.CORBA,org.omg.CORBA.portable";version="0.0.0.1_007_JavaSE", org.omg.DynamicAny;uses:="org.omg.CORBA,org.omg.CORBA.portable,org.omg.DynamicAny.DynAnyFactoryPackage,org.omg.DynamicAny.DynAnyPackage";version="0.0.0.1_007_JavaSE", org.omg.IOP.CodecFactoryPackage;uses:="org.omg.CORBA,org.omg.CORBA.portable";version="0.0.0.1_007_JavaSE", org.omg.IOP.CodecPackage;uses:="org.omg.CORBA,org.omg.CORBA.portable";version="0.0.0.1_007_JavaSE", org.omg.IOP;uses:="org.omg.CORBA,org.omg.CORBA.portable,org.omg.IOP.CodecFactoryPackage,org.omg.IOP.CodecPackage";version="0.0.0.1_007_JavaSE", org.omg.Messaging;uses:="org.omg.CORBA,org.omg.CORBA.portable";version="0.0.0.1_007_JavaSE", org.omg.PortableInterceptor.ORBInitInfoPackage;uses:="org.omg.CORBA,org.omg.CORBA.portable";version="0.0.0.1_007_JavaSE", org.omg.PortableInterceptor;uses:="org.omg.CORBA,org.omg.CORBA.portable,org.omg.IOP,org.omg.PortableInterceptor.ORBInitInfoPackage,org.omg.CORBA_2_3.portable,org.omg.Dynamic";version="0.0.0.1_007_JavaSE", org.omg.PortableServer.CurrentPackage;uses:="org.omg.CORBA,org.omg.CORBA.portable";version="0.0.0.1_007_JavaSE", org.omg.PortableServer.POAManagerPackage;uses:="org.omg.CORBA,org.omg.CORBA.portable";version="0.0.0.1_007_JavaSE", org.omg.PortableServer.POAPackage;uses:="org.omg.CORBA,org.omg.CORBA.portable";version="0.0.0.1_007_JavaSE", org.omg.PortableServer.ServantLocatorPackage;uses:="org.omg.CORBA,org.omg.CORBA.portable";version="0.0.0.1_007_JavaSE", org.omg.PortableServer.portable;uses:="org.omg.CORBA,org.omg.PortableServer";version="0.0.0.1_007_JavaSE", org.omg.PortableServer;uses:="org.omg.CORBA,org.omg.CORBA.portable,org.omg.PortableServer.CurrentPackage,org.omg.PortableServer.POAManagerPackage,org.omg.PortableServer.POAPackage,org.omg.PortableServer.portable,org.omg.CORBA_2_3,org.omg.PortableServer.ServantLocatorPackage";version="0.0.0.1_007_JavaSE", org.omg.SendingContext;uses:="org.omg.CORBA,org.omg.CORBA.portable";version="0.0.0.1_007_JavaSE", org.omg.stub.java.rmi;uses:="javax.rmi.CORBA";version="0.0.0.1_007_JavaSE", org.w3c.dom.bootstrap;uses:="org.w3c.dom";version="0.0.0.1_007_JavaSE", org.w3c.dom.events;uses:="org.w3c.dom,org.w3c.dom.views";version="0.0.0.1_007_JavaSE", org.w3c.dom.ls;uses:="org.w3c.dom,org.w3c.dom.events,org.w3c.dom.traversal";version="0.0.0.1_007_JavaSE", org.w3c.dom;version="0.0.0.1_007_JavaSE", org.xml.sax.ext;uses:="org.xml.sax,org.xml.sax.helpers";version="0.0.0.1_007_JavaSE", org.xml.sax.helpers;uses:="org.xml.sax";version="0.0.0.1_007_JavaSE", org.xml.sax;version="0.0.0.1_007_JavaSE"</code></pre><p>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 <code class="literal">felix:lb</code> command:</p><pre class="literallayout"> 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)</pre></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="_eclipse"></a>Eclipse</h4></div></div></div><p>The jetty OSGi integration has been successfully tested against
<a class="link" href="https://www.eclipse.org/equinox/" target="_top">Equinox</a> Mars RC1.</p><p>Ensure that these services are present:</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><a class="link" href="https://www.eclipse.org/equinox/bundles/" target="_top">Configuration Admin</a></li><li class="listitem"><a class="link" href="https://www.eclipse.org/equinox/bundles/" target="_top">Event Admin</a></li></ul></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a name="_eclipse_update_site"></a>Eclipse Update Site</h5></div></div></div><p>There is a list of Eclipse P2 sites for the jetty releases maintained at
<a class="link" href="http://download.eclipse.org/jetty/updates/jetty-bundles-9.x/" target="_top">http://download.eclipse.org/jetty/updates/jetty-bundles-9.x/</a></p><p>Each P2 repo has one big feature group that defines most of the jetty
jars. <span class="strong"><strong>Beware: No 3rd party dependency jars are included, so you will
need to have installed the dependencies listed previously in this
document.</strong></span></p><p>In addition, as the feature group includes websocket, you will need to
download and have installed the javax.websocket-api jar:</p><div class="table"><a name="d0e25141"></a><p class="title"><b>Table&nbsp;29.6.&nbsp;Extra Jars Required for Websocket</b></p><div class="table-contents"><table class="table" summary="Extra Jars Required for Websocket" border="1"><colgroup><col class="col_1"><col class="col_2"><col class="col_3"></colgroup><thead><tr><th align="left" valign="top">Jar</th><th align="left" valign="top">Bundle Symbolic Name</th><th align="left" valign="top">Location</th></tr></thead><tbody><tr><td align="left" valign="top"><p>javax.websocket-api</p></td><td align="left" valign="top"><p>javax.websocket-api</p></td><td align="left" valign="top"><p><a class="link" href="http://central.maven.org/maven2/javax/websocket/websocket-api" target="_top">Maven
central</a></p></td></tr></tbody></table></div></div><br class="table-break"></div></div></div></div><script type="text/javascript">
SyntaxHighlighter.all()
</script><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="frameworks.html"><i class="fa fa-chevron-left" aria-hidden="true"></i> Previous</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="frameworks.html"><i class="fa fa-chevron-up" aria-hidden="true"></i> Top</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="framework-weld.html">Next <i class="fa fa-chevron-right" aria-hidden="true"></i></a></td></tr><tr><td width="40%" align="left" valign="top">Chapter&nbsp;29.&nbsp;Frameworks&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html"><i class="fa fa-home" aria-hidden="true"></i> Home</a></td><td width="40%" align="right" valign="top">&nbsp;Weld</td></tr></table></div><p xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><div class="jetty-callout">
See an error or something missing?
<span class="callout"><a href="http://github.com/eclipse/jetty.project">Contribute to this documentation at
<span class="website"><i class="fa fa-github" aria-hidden="true"></i> Github!</span></a></span><span style="float: right"><i>(Generated: 2019-11-05)</i></span></div></p></body></html>