Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Customizing 404 response for virtual hosts

Is your webapp a traditional WAR file with a WEB-INF/web.xml or a jetty embedded setup?

Joakim Erdfelt / joakim@xxxxxxxxxxx

On Tue, Aug 4, 2015 at 4:39 AM, John English <john.foreign@xxxxxxxxx> wrote:
I asked this a few days ago; would have thought it's an easy one, but no-one's responded; maybe it's not so easy, or maybe I wasn't clear enough. So I'll try again.

I have a webapp in the root context of my server (which, incidentally, has its own customized 404 handler). The webapp uses a virtual host list:
  <Set name="virtualHosts">
     <Array type="java.lang.String">

This works fine, and allows connections to and, and if I try connecting to it via an address which is not in the list I get a standard 404 response which says:

Problem accessing /. Reason:
    Not Found
Powered by Jetty://

I would like to customize this response. I've RTFM'ed, but all I've found is the section on "Server level 404 error" whose only advice is "Create a "root" web app mapped to the "/" URI" which is advice for a quite different problem (and I already have a root webapp mapped to "/").

So can anyone tell me what I need to do to customize this response?

John English
jetty-users mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Back to the top