Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

What is jetty-web.xml?

The jetty-web.xml file is a jetty configuration file that can be bundled with a specific web application. When jetty deploys a webapplication, it looks for a file called WEB-INF/jetty-web.xml or WEB-INF/web-jetty.xml within the web application (or WAR) and applies the configuration found there after all other configuration has been applied to the web application.

The format of the jetty-web.xml file is the same as jetty.xml. That is, it is an xml mapping of the jetty API. Note that the object to which it is applied is an org.mortbay.jetty.webapp.WebAppContext instance rather than an org.mortbay.jetty.Server instance:

Code Block
xml
xml
<?xml version="1.0"  encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
<Configure class="org.mortbay.jetty.webapp.WebAppContext">
  ...
</Configure>


There is an example of this file in the distribution at $JETTY_HOME/webapps/test/WEB-INF/jetty-web.xml.

Contact the core Jetty developers at www.webtide.com
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