Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] use of MovedContextHandler to remove "www."

On Fri, Apr 17, 2015 at 8:32 AM, Simone Bordet <sbordet@xxxxxxxxxxx> wrote:

On Wed, Apr 15, 2015 at 9:50 PM, Tim Halloran <hallorant@xxxxxxxxx> wrote:
> I'm trying to make all connections use at my site using:
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN"
> "">
> <Configure class="org.eclipse.jetty.server.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>
> </Configure>
> But even though this class is in jetty-server-9.2.10.v20150310.jar I don't
> know where to put this xml file in jetty.base so it gets used?  If I just
> add it to my command line my site fails it loads up then doesn't work

You must add it to $jetty.base/webapps (provided you have enabled the
"deploy" module).

Thanks, I figured that out playing around (really I don't know why it didn't occur to me) -- it actually doesn't work.  I really want to change the host name used from to but that doesn't work.

I don't think there is a way to do this with Jetty, change all traffic from 


at least that I can find in the docs.  (of course the two addresses are the same host)

Simone Bordet
Developer advice, training, services and support
from the Jetty & CometD experts.
Intalio, the modern way to build business applications.
jetty-users mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Back to the top