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

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 foo.com to
www.foo.com 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"]http://www.foo.com[/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]foo.com[/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 CarPoint.com.au http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fsecure%2Dau%2Eimrworldwide%2Ecom%2Fcgi%2Dbin%2Fa%2Fci%5F450304%2Fet%5F2%2Fcg%5F801459%2Fpi%5F1004813%2Fai%5F859641&_t=762955845&_r=tig_OCT07&_m=EXT