Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Error page not working

Suddenly for no apparent reason the error-page directive in my web.xml
is not working (Jetty 7.2.0). It looks like this:

  <error-page>
    <exception-type>java.lang.Exception</exception-type>
    <location>/error</location>
  </error-page>

/error is mapped to a servlet that mails a report to the system manager
and displays a suitable message. It worked yesterday; I haven't changed
the web.xml or the error servlet, but today what happens is I get a
blank page (zero bytes in length).

The actual exception is wrapped in a ServletException and then thrown.
I have put breakpoints at the point where the ServletException is thrown
(which it reaches) and at the start of the error servlet (which it
doesn't reach). The request log shows no requests for /error. I tried
changing the error URL to /x (which is a 404) and to /x.htm (which is
a plain HTML page which displays fine if accessed directly). Neither
of these have any effect.

The exception goes to ServletHolder.handle line 543, but I can't trace
it past there as I just have the Jetty jar file and no source. Can
anyone tell me what might be happening here?

TIA,

John English


Back to the top