Jetty Logo
Version: 9.3.13.v20161014
Contact the core Jetty developers at

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

Hot Deployment

Jetty allows for deploying an arbitrary context or web application by monitoring a directory for changes. If a web application or a context descriptor is added to the directory, Jetty’s DeploymentManager (DM) deploys a new context. If a context descriptor is touched or updated, the DM stops, reconfigures, and redeploys its context. If a context is removed, the DM stops it and removes it from the server.

This behavior can be controlled by configuring WebAppProvider properties.

The directory to scan for possible deployable Web Applications (or Deployment Descriptor XML files).
Number of seconds between scans of the provided monitoredDirName. A value of 0 disables the continuous hot deployment scan, Web Applications will be deployed on startup only.

The default location for this configuration is in the ${jetty.home}/etc/jetty-deploy.xml file.

<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "">

<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 refid="Contexts" />
        <Call name="setContextAttribute">

        <Call id="webappprovider" name="addAppProvider">
            <New class="org.eclipse.jetty.deploy.providers.WebAppProvider">
              <Set name="monitoredDirName"><Property name="jetty.base" default="." />/<Property name="jetty.deploy.monitoredDir" deprecated="jetty.deploy.monitoredDirName" default="webapps"/></Set>
              <Set name="defaultsDescriptor"><Property name="jetty.home" default="." />/etc/webdefault.xml</Set>
              <Set name="scanInterval"><Property name="jetty.deploy.scanInterval" default="1"/></Set>
              <Set name="extractWars"><Property name="jetty.deploy.extractWars" default="true"/></Set>

See Understanding the Default WebAppProvider for more configuration details.

See also Deployment Architecture for detailed conceptual information.

See an error or something missing? Contribute to this documentation at Github!(Generated: 2016-10-14)