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 7 Next »

How to move or relocate a Context.

The MovedContextHandler may be used to relocate or redirect a context that has changed context path and/or virtual hosts.

You can configure it to permanently redirect the old url to the new url. Jetty sends a Http Status code of 301 to the browser with the new url. Alternatively, you can make it non-permanent, in which case Jetty sends a 302 Http Status code along with the new url.

In addition, like any other context, you can configure a list of virtual hosts, meaning that this context will only respond to requests with to one of the listed host names.

The sample context configuration below redirects the /foo context to / with a permanent redirection, while preserving pathinfo and query strings. This file would be put into $JETTY_HOME/contexts directory:

move-my-context.xml

FAQ
Back to FAQ


  • 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