Jetty Logo
Version: 9.3.7.v20160115
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 from 1 day to full product delivery


jetty-env.xml Root Element
Using jetty-env.xml
Additional jetty-env.xml Resources

jetty-env.xml is an optional Jetty file that configures JNDI resources for an individual webapp. The format of jetty-env.xml is the same as jetty.xml –it is an XML mapping of the Jetty API.

When Jetty deploys a web application, it automatically looks for a file called WEB-INF/jetty-env.xml within the web application (or WAR), and sets up the webapp naming environment so that naming references in the WEB-INF/web.xml file can be resolved from the information provided in the WEB-INF/jetty-env.xml and jetty.xml files. You define global naming resources on the server via jetty.xml.

jetty-env.xml Root Element

Jetty applies jetty-env.xml on a per-webapp basis, and configures an instance of org.eclipse.jetty.webapp.WebAppContext.


Make sure you are applying the configuration to an instance of the proper class. jetty-env.xml configures an instance of WebAppContext, and not an instance of Server.

Using jetty-env.xml

Place the jetty-env.xml file in your web application's WEB-INF folder.

Additional jetty-env.xml Resources

  • Jetty XML Syntax –In-depth reference for Jetty-specific configuration XML syntax.

  • jetty.xml –Configuration file for configuring the entire server.

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