You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Stefano Mazzocchi <st...@apache.org> on 2000/01/26 11:40:16 UTC

Re: tomcat bug

> Jeff Madynski wrote:
> 
> Hi Stefano,
> I am not sure if you are the right person to contact. Please forward
> to someone else if not.

Please, next time, subscribe to the tomcat-dev@jakarta.apache.org mail
list to submit such bug reports. Thank you.

(guys, is the GNATS bug database on on locus?)

> I wanted to submit a bug with tomcat, but the link isn't there yet.
> in my html templates, i include some jsp. This involves a call to
> RequestDispatcherInclude, the jsp does its thing, and
> I continues processing my html. I usually use JRUN and it works fine.
> When I use Tomcat, it blows an exception.
> I propose the following code changes, which I have tested and found
> acceptable:
> 
> 1. getOutputStream -- either catch or throw IOException and call
> flushBuffer() if it is os is used, then continue processing.
> 
> 2. getWriter -- same thing basically (already throws IOException)
> 
>     public ServletOutputStream getOutputStream() throws IOException {
>  started = true;
> 
>  if (usingWriter) {
>         flushBuffer();
> // jmm test
> //      String msg = sm.getString("serverResponse.outputStream.ise");
> 
> //     throw new IllegalStateException(msg);
>  }
> 
>  usingStream = true;
> 
>  return out;
>     }
> 
>     public PrintWriter getWriter() throws IOException {
>  started = true;
> 
>  if (usingStream) {
>         flushBuffer();
> // jmm test
> //     String msg = sm.getString("serverResponse.writer.ise");
> 
> //     throw new IllegalStateException(msg);
>  }


-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Come to the first official Apache Software Foundation Conference!  
------------------------- http://ApacheCon.Com ---------------------