You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Kirby Vandivort <kv...@ks.uiuc.edu> on 2002/02/06 00:12:55 UTC

Re: Tomcat 4, IOExceptions,

I brought this up back in early january...

Apache also returns the error response code (to add another to your
list of ones that return the non 200 code...)

I can't figure out how to pull it up doing a 'search' in the archive
either.. but Craig's response is at:

http://mikal.org/interests/java/tomcat/archive/view?mesg=51527

On Tue, Feb 05, 2002 at 05:43:13PM -0600, Christopher K. St. John wrote:
> 
>  Tomcat 4 throws away servlet generated IOExceptions. For 
> example:
> 
>  public void doGet(HttpServletRequest req,
>                    HttpServletResponse rsp)
>     throws IOException, ServletException
>   {
>     PrintWriter pwrt = rsp.getWriter();
>     pwrt.println("HELLO");
>     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 cks@distributopia.com
> DistribuTopia http://www.distributopia.com
> 
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>

-- 

Kirby Vandivort                      Theoretical Biophysics Group
Email: kvandivo@ks.uiuc.edu          3051 Beckman Institute
http://www.ks.uiuc.edu/~kvandivo/    University of Illinois
Phone: (217) 244-5711                405 N. Mathews Ave
Fax  : (217) 244-6078                Urbana, IL  61801, USA

--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: Tomcat 4, IOExceptions,

Posted by "Christopher K. St. John" <ck...@distributopia.com>.
Kirby Vandivort wrote:
> 
> I brought this up back in early january...
> 

 It's close, it's a similiar issue, but it's not the same
issue. What I'm saying is that Tomcat 4 will never match:

  <error-page>
    <exception-type> java.io.IOException </exception-type>
    <location> /ioexception.html </location>
  </error-page>

 because all servlet-generated IOExceptions are silently
swallowed up by StandardWrapperValve before they get a
chance to be handled by the <error-page> mechanism.

 This strikes me as bad, but there are comments in the
Catalina code that indicate it's intentional... 


-- 
Christopher St. John cks@distributopia.com
DistribuTopia http://www.distributopia.com

--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>