Dashboard > Jetty > ... > Jetty Documentation > jetty-web.xml
jetty-web.xml Log In | Sign Up   View a printable version of the current page.

Added by Jan Bartel , last edited by Nic Ferrier on Jun 19, 2007  (view change)
Labels: 
(None)

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

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:

<?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.

Site running on a free Atlassian Confluence Open Source Project License granted to The Codehaus. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.6.2 Build:#919 Nov 26, 2007) - Bug/feature request - Contact Administrators