Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Jetty/Reference/jetty.xml"

 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
{{Jetty Reference
 
{{Jetty Reference
| introduction = <tt>jetty.xml</tt> is the default configuration file for Jetty, typically located at <tt>$JETTY_HOME/etc/jetty.xml</tt>.  Typically the jetty.xml will configure:
+
| introduction =  
 +
 
 +
{{Jetty Redirect|http://www.eclipse.org/jetty/documentation/current/jetty-xml-config.html}}
 +
 
 +
<tt>jetty.xml</tt> is the default configuration file for Jetty, typically located at <tt>$JETTY_HOME/etc/jetty.xml</tt>.  Usually the jetty.xml configures:
 
* the Server class (or subclass if extended) and global options
 
* the Server class (or subclass if extended) and global options
 
* a ThreadPool (min & max thread)
 
* a ThreadPool (min & max thread)
* connectors (ports, timeouts, buffer sizes, protocol etc.)
+
* connectors (ports, timeouts, buffer sizes, protocol, etc.)
* the handler structure (default handlers and/or a contextHandlerCollections etc.)
+
* the handler structure (default handlers and/or a contextHandlerCollections, etc.)
 
* the deployment manager that scans for and deploys webapps and contexts
 
* the deployment manager that scans for and deploys webapps and contexts
* login services that provides authentication checking.
+
* login services that provides authentication checking
 
* a request log
 
* a request log
  
Because Jetty has many options, not all of them are configured in jetty.xml and there are several optional configuration files that share the same format of jetty.xml and are essentially concatenated to it (if specified).   These configuration files are also stored in <tt>$JETTY_HOME/etc/</tt> and examples of them may be found in [http://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk/jetty-server/src/main/config/etc/ svn]. The selection of which configuration files to use is controlled by [[Jetty/Feature/Start.jar|start.jar]] and the process of merging configuration is described in [[Jetty/Reference/jetty.xml_usage|jetty.xml usage]]
+
Not all Jetty features are configured in <tt>jetty.xml</tt>. There are several optional configuration files that share the same format as <tt>jetty.xml</tt> and, if specified, concatenate to it. These configuration files are also stored in <tt>$JETTY_HOME/etc/</tt>, and examples of them are in [http://dev.eclipse.org/viewsvn/index.cgi/jetty/trunk/jetty-server/src/main/config/etc/?root=RT_JETTY SVN Repository]. The selection of which configuration files to use is controlled by [[Jetty/Feature/Start.jar|start.jar]] and the process of merging configuration is described in [[Jetty/Reference/jetty.xml_usage|jetty.xml usage]].
 
+
  
 
| body =  
 
| body =  
Line 31: Line 34:
  
 
| more =  
 
| more =  
* [[Jetty/Tutorial/jetty.xml|jetty.xml Tutorial]] - detailed tutorial which walks you through writing your own version of jetty.xml
+
* [[Jetty/Tutorial/jetty.xml|jetty.xml Tutorial]]–detailed tutorial that walks you through writing your own version of jetty.xml
* [[Jetty/Reference/jetty.xml syntax|jetty.xml Syntax Reference]] - in-depth reference for Jetty-specific configuration XML syntax
+
* [[Jetty/Reference/jetty.xml syntax|jetty.xml Syntax Reference]]–in-depth reference for Jetty-specific configuration XML syntax
* [[Jetty/Reference/jetty-web.xml|jetty-web.xml]] - configuration file for configuring a specific webapp
+
* [[Jetty/Reference/jetty-web.xml|jetty-web.xml]]–configuration file for configuring a specific webapp
  
 
}}
 
}}

Latest revision as of 15:42, 23 April 2013



Introduction

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




THIS IS NOT THE DOCUMENTATION YOU ARE LOOKING FOR!!!!!






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: http://www.eclipse.org/jetty/documentation/current/jetty-xml-config.html


jetty.xml is the default configuration file for Jetty, typically located at $JETTY_HOME/etc/jetty.xml. Usually the jetty.xml configures:

  • the Server class (or subclass if extended) and global options
  • a ThreadPool (min & max thread)
  • connectors (ports, timeouts, buffer sizes, protocol, etc.)
  • the handler structure (default handlers and/or a contextHandlerCollections, etc.)
  • the deployment manager that scans for and deploys webapps and contexts
  • login services that provides authentication checking
  • a request log

Not all Jetty features are configured in jetty.xml. There are several optional configuration files that share the same format as jetty.xml and, if specified, concatenate to it. These configuration files are also stored in $JETTY_HOME/etc/, and examples of them are in SVN Repository. The selection of which configuration files to use is controlled by start.jar and the process of merging configuration is described in jetty.xml usage.

Root Element

jetty.xml configures an instance of the Jetty org.eclipse.jetty.server.Server.

<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
 
<Configure id="Server" class="org.eclipse.jetty.server.Server">
 ...
</Configure>

Examples

$JETTY_HOME/etc contains the default jetty.xml, as well as other sample configuration files (jetty-*.xml) which can be passed to the server via the command line.

Additional Resources

Back to the top