tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher K. St. John" <>
Subject Tomcat 4, IOExceptions, <error-page>
Date Tue, 05 Feb 2002 23:43:13 GMT

 Tomcat 4 throws away servlet generated IOExceptions. For 

 public void doGet(HttpServletRequest req,
                   HttpServletResponse rsp)
    throws IOException, ServletException
    PrintWriter pwrt = rsp.getWriter();
    throw new IOException("my very own io exception");

 In Tomcat 4 will produce a 200 OK response with a body
of "HELLO". Tomcat 3 and Jetty both send back an HTTP
error response. From my reading of SRV.9.9.2 Jetty and
3 are right, 4 is wrong. But...

 Tomcat 4's behavior appears to be on purpose. There
is a catch(IOException) in StandardWrapperValve.invoke()
that has the comments:

   ;   // No reporting to the response
   ;   // No change in availability status

 I thought I had seen a discussion of this before, but
either I was hallucinating or I'm using the wrong set
of search terms when I check the list archives (and
bugzilla and google).

 So, anyway, is this a bug or a feature? 

Christopher St. John

To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

View raw message