Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: for the plan.

Jump to: navigation, search

Jetty/Feature/Hot Deployment

< Jetty‎ | Feature
Revision as of 15:01, 23 April 2013 by Unnamed Poltroon (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Jetty 7 and Jetty 8 are now EOL (End of Life)


All development and stable releases are being performed with Jetty 9 and Jetty 10.

This wiki is now officially out of date and all content has been moved to the Jetty Documentation Hub

Direct Link to updated documentation:

Jetty provides capability to deploy an arbitrary context or web application by monitoring a directory for changes. If you add a web application or a context descriptor to the directory, Jetty's Deployment Manager (DM) deploys a new context. If you touch or update a context descriptor, the DM stops, reconfigures, and redeploys its context. If you remove a context, the DM stops it and removes it from the server.


The deployment manager is a state-oriented mechanism suitable for developers and embedded users to customize to a variety of use cases. An example follows of the jetty.xml that creates the basic deployment manager, which Jetty then uses to plug in the ContextProvider and the WebAppProvider that back the Hot Deployment mechanism. This example also provides information about adding another node to the deployment state, in this case a debug binding. In the Jetty distribution this XML is in the jetty-deploy.xml file, which combined with the jetty-contexts.xml and jetty-webapps.xml files comprise the stock jetty hot deployment mechanism.

<Configure id="Server" class="org.eclipse.jetty.server.Server">
    <Call name="addBean">
        <New id="DeploymentManager" class="org.eclipse.jetty.deploy.DeploymentManager">
          <Set name="contexts">
            <Ref id="Contexts" />
          <Call name="setContextAttribute">
          <!-- Add a customize step to the deployment lifecycle -->
          <!-- uncomment and replace DebugBinding with your extended AppLifeCycle.Binding class 
          <Call name="insertLifeCycleNode">
          <Call name="addLifeCycleBinding">
              <New class="org.eclipse.jetty.deploy.bindings.DebugBinding">

Additional Resources

See the Context Provider and WebApp Provider documentation for more information. Previously, Jetty implemented this feature via a ContextDeployer and WebappDeployer, which have both been deprecated.

See also the Deployment Manager feature reference for detailed conceptual information.

Back to the top