Re: OutputStream Already in USE ..!!!!

2001-04-07 Thread Lakshmeenrayana

Thanks Benoit ,

But since i am generating the graph image dynamically and the output of the
ACME encoded Gif
is directly to the client browser window, i will not be certainly knowing
the size.
So there is no way i can guess the size.
It will always be a blind solution.

And also one more query..

How to avoid the Exception error ("..IllegalStateException..OutputStream is
already been used..") in the Tomcat window.

Please reply soon.
Thanks for the Time.

Regards..

[ Benoit  this time Michael wont be annoyed..Right Michael ;-) ]

L G Goundalkar
Intertec Communications Pvt Ltd
INDIA

- Original Message -
From: "Benot Jacquemont" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, April 06, 2001 4:14 PM
Subject: RE: OutputStream Already in USE ..


 Usually, you don't set the Content-Length because that's generated pages,
 and if you set a Content-Length higher than the real size of the generated
 gif, I don't know how IE or Netscape will react... But you can try it. I
 think you just have to set the Content-Length the same way you set the
 Content-Type.

 Hope that'll help.

 Benot

 Ps: Please, try to send your mail in plain text format, otherwise, you
annoy
 Michael ;-)

 -Message d'origine-
 De : Lakshmeenrayana [mailto:[EMAIL PROTECTED]]
 Envoy : vendredi 6 avril 2001 21:26
  : [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Objet : Re: OutputStream Already in USE ..


 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.
 Regards..

 L G Goundalkar
 Intertec Communications Pvt Ltd
 INDIA
 - Original Message -
 From: Benot Jacquemont
 To: [EMAIL PROTECTED]
 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.

 Benot

  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.

 Regards.

 L G Goundalkar
 Intertec Communications Pvt Ltd
 INDIA




RE: OutputStream Already in USE ..!!!!

2001-04-06 Thread Benoît Jacquemont




  
  I don't know why you get a OutputStream already in use, 
  butthereason whyit works with IE and not with Netscape may 
  be because you do not setproperly the Content-type 
  ofyourimage. Indeed, IE seems to be a little bitcleverer 
  than Netscape because it interprets the real content of a file before 
  displaying itinstead ofonly looking at the Content-type header 
  property. So you have to be more explicit with 
  Netscape.
  
  Benoît
  
  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.
  Iam 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.
  
  Regards.
  
  L G GoundalkarIntertec 
  Communications Pvt 
LtdINDIA


RE: OutputStream Already in USE ..!!!!

2001-04-06 Thread Michael Wentzel

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.
 
Benot 
 
 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.

--
The OutputStream already in use is because the automatically generated code
in a jsp class file
gets the output stream as a JSPWriter therefore when getOutputStream() is
called it thinks there
is already an 'external lock' of this resource object and doesn't think it
can use it.

BTW, please post to the list in plain text.  This has been stated over and
over and is also listed
on the website as one of the mailing list guidelines.  More people will be
willing to answer your
questions if you post in plain text.



---
Michael Wentzel
Software Developer
Software As We Think - http://www.aswethink.com



Re: OutputStream Already in USE ..!!!!

2001-04-06 Thread Lakshmeenrayana



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.
Regards..

L G GoundalkarIntertec Communications Pvt 
LtdINDIA

  - Original Message - 
  From: 
  Benoît Jacquemont 
  To: [EMAIL PROTECTED] 
  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, 
butthereason whyit works with IE and not with Netscape may 
be because you do not setproperly the Content-type 
ofyourimage. Indeed, IE seems to be a little bitcleverer 
than Netscape because it interprets the real content of a file before 
displaying itinstead ofonly looking at the Content-type header 
property. So you have to be more explicit with 
Netscape.

Benoît

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.
Iam 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.

Regards.

L G 
GoundalkarIntertec Communications Pvt 
LtdINDIA


RE: OutputStream Already in USE ..!!!!

2001-04-06 Thread Benoît Jacquemont

Usually, you don't set the Content-Length because that's generated pages,
and if you set a Content-Length higher than the real size of the generated
gif, I don't know how IE or Netscape will react... But you can try it. I
think you just have to set the Content-Length the same way you set the
Content-Type.

Hope that'll help.

Benot

Ps: Please, try to send your mail in plain text format, otherwise, you annoy
Michael ;-)

-Message d'origine-
De : Lakshmeenrayana [mailto:[EMAIL PROTECTED]]
Envoy : vendredi 6 avril 2001 21:26
 : [EMAIL PROTECTED]; [EMAIL PROTECTED]
Objet : Re: OutputStream Already in USE ..


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.
Regards..

L G Goundalkar
Intertec Communications Pvt Ltd
INDIA
- Original Message -
From: Benot Jacquemont
To: [EMAIL PROTECTED]
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.

Benot

 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.

Regards.

L G Goundalkar
Intertec Communications Pvt Ltd
INDIA