Skip to main content

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

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">
        <Item>foo.bar.com</Item>
        <Item>127.0.0.1</Item>
     </Array>
  </Set>

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

HTTP ERROR: 404
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?

TIA,
--
John English


Back to the top