You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by kramer <jw...@home.com> on 2000/11/13 03:19:46 UTC

[BUG] OutputStream is already being used for this request

I am still getting the error message "OutputStream is already being used for
this request" even with 3.2 beta 7.

Does any one know if this should be fix prior to finial 3.2?



Re: [BUG] OutputStream is already being used for this request

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
kramer wrote:

> I am getting this while using request.getOutputStream() to write binary data
> is a JSP.
> I did some more hunting and it looks like this is not allowed, and should be
> done only in a servlet.
> I is a shame, because it was only three lines of code and to go through all
> the servlet sets just for just three
> lines of code.
>

It's really pretty simple ... JSP pages are designed for text output, not binary
output.  As such, they perform automatic conversions like character encoding
based on the internationalization settings.  If you perform such conversions on
the bytes of a binary output stream, you will corrupt it.

For exactly the same reason, the servlet API supports separate APIs for
character output and binary output.  The character output stream performs
character encoding conversions -- the binary output stream does not.

>
> Jim K
>

Craig McClanahan



RE: [BUG] OutputStream is already being used for this request

Posted by kramer <jw...@home.com>.
I am getting this while using request.getOutputStream() to write binary data
is a JSP.
I did some more hunting and it looks like this is not allowed, and should be
done only in a servlet.
I is a shame, because it was only three lines of code and to go through all
the servlet sets just for just three
lines of code.

Jim K

-----Original Message-----
From: Craig R. McClanahan [mailto:Craig.McClanahan@eng.sun.com]
Sent: Sunday, November 12, 2000 11:06 PM
To: tomcat-user@jakarta.apache.org
Subject: Re: [BUG] OutputStream is already being used for this request


kramer wrote:

> I am still getting the error message "OutputStream is already being used
for
> this request" even with 3.2 beta 7.
>
> Does any one know if this should be fix prior to finial 3.2?

Under what circumstances are you getting this message?  There are valid
cases of
getting this that are required by the servlet 2.2 specification -- but
without
knowing what your scenario is, nobody can tell if this is a feature or a bug
:-).

Craig McClanahan




Re: [BUG] OutputStream is already being used for this request

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
kramer wrote:

> I am still getting the error message "OutputStream is already being used for
> this request" even with 3.2 beta 7.
>
> Does any one know if this should be fix prior to finial 3.2?

Under what circumstances are you getting this message?  There are valid cases of
getting this that are required by the servlet 2.2 specification -- but without
knowing what your scenario is, nobody can tell if this is a feature or a bug
:-).

Craig McClanahan