Jetty has moved!
Jetty is a project at the Eclipse Foundation.
Homepage:http://www.eclipse.org/jetty
Downloads: http://download.eclipse.org/jetty/
Documentation:http://www.eclipse.org/jetty/documentation/current/
About:http://www.eclipse.org/jetty/about.php
Jetty Powered:http://www.eclipse.org/jetty/powered/
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
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

What is webdefault.xml?

The webdefault.xml is a file which is applied to a web application BEFORE the application's own WEB-INF/web.xml. It is used to save a web application from having to define a lot of house-keeping and container-specific elements in their own web.xml files.

There is a copy of the webdefault.xml file supplied with jetty in $(jetty.home)/etc/webdefault.xml.

Configuration contained in webdefault.xml

Session configuration

JSP configuration

Mime configuration

Default Servlet for static content

Dynamic Invocation

How to customize webdefault.xml

Jetty Standalone

You can modify any of the settings inside the version of webdefault.xml shipped in the jetty distribution and apply it to an individual web application by using:

Which equivalently in code is:

If you want to apply the same custom webdefault.xml to a number of webapps, then supply the path to the file to the deployer:

Jetty Maven Plugin

Similarly, for the maven jetty plugin, you provide a customized webdefault.xml file for your webapp by:

You can find more information on configuring the manve jetty plugin here.

  • No labels
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