tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lakshmeenrayana" <>
Subject Re: OutputStream Already in USE ..!!!!
Date Fri, 06 Apr 2001 19:26:23 GMT
Thanks Benoit  and  Michael

It works in Netscape.

But one more strange problem has arrived.
If the Size of the graph ( image ) is less..approximately less than 5k or so...
The same problem persists..(ASCII Characters output).
So how to set the content length..? since i don't know the content length of the graph image
generated by the GIF encoder.
Please help again.

Thanks for the time.

L G Goundalkar
Intertec Communications Pvt Ltd
  ----- Original Message ----- 
  From: Benoît Jacquemont 
  Sent: Friday, April 06, 2001 2:18 PM
  Subject: RE: OutputStream Already in USE ..!!!!

    I don't know why you get a OutputStream already in use, but the reason why it works with
IE and not with Netscape may be because you do not set properly the Content-type of your image.
Indeed, IE seems to be a little bit cleverer than Netscape because it interprets the real
content of a file before displaying it instead of only looking at the Content-type header
property. So you have to be more explicit with Netscape.
     I am using Tomcat and trying to write a Gif file to client browser window using JSP.
    I use ACME - GifEncoder to convert the picture to GIF.
    The Encoder needs OutputStream type object as one of the parameter in its constructor.
    I am using ServletOutputStream object for this, which i got through response.getOutputStream().

    But the tomcat gives Error as "OutputStream already been used."  

    But the GIF image is Displayed properly in IE 5.0.

    It gives ASCII charactes in Netscape.

    Why is this so.

    Please help.
    Thanks for the time.


    L G Goundalkar
    Intertec Communications Pvt Ltd

View raw message