atom feed1 message in net.sourceforge.lists.jetty-support[Jetty-support] Configuring MovedCont...
FromSent OnAttachments
Michael yatesAug 5, 2008 6:20 am 
Subject:[Jetty-support] Configuring MovedContextHandler from jetty-web.xml (again)
From:Michael yates (
Date:Aug 5, 2008 6:20:06 am

All, Firstly apologies if my message turns up twice to the list. I tried posting the
message below from a hotmail account and it looks like hotmail stripped the
original XML formatting. Trying reposting with "alternate" XML markup.

I was wondering if someone could help me configure a MovedContextHandler from
jetty-web.xml.I am using this to apply a permanent redirect from to I have already successfully configured a MovedContextHandler by:1) Ensuring I
had a ContextDeployer configured in my jetty.xml2) Authoring a context xml
called test.xml that configured my MovedContextHandler3) Dropping test.xml in
[jetty.home]/contexts/ Now I would like to move that configuration into jetty-web.xml. This is being
done to aide with automatic build/deploy customization. So I have tried putting the following in jetty-web.xml (excuse
the formatting of the xml)

------ [Get name="server"] [Call name="addHandler"] [Arg] [New
class="org.mortbay.jetty.handler.MovedContextHandler"] [Set
name="contextPath"]/[/Set] [Set
name="newContextURL"][/Set] [Set
name="permanent"]true[/Set] [Set name="discardPathInfo"]false[/Set]
[Set name="discardQuery"]false[/Set] [Set name="virtualHosts"]
[Array type="java.lang.String"] [Item][/Item]
[/Array] [/Set] [Call name="start"][/Call] [/New]
[/Arg] [/Call] [/Get]

------ Things that I know:- that my jetty-web.xml is being picked up.- that traversing
to the server object from the jetty-web.xml works (I configure an SSL connector
inside jetty-web.xml) However with the above configuration the MovedContext just doesn't work. Thanks for any input. Michael

_________________________________________________________________ It's simple! Sell your car for just $40 at