tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From KC Berg <KB...@latis.com>
Subject RE: IlligalStateException -- getOutputStream() has already been c alled for this response.
Date Tue, 26 Feb 2002 21:01:51 GMT
How are you doing the includes? Also when you are using a forward in a
servlet you can not print anything to the output buffer before you use the
forward. Because once the output stream has been sent to the browser the
server can no longer forward that stream to another servlet.

KC  

-----Original Message-----
From: Dmitry Nikelshpur [mailto:dnikelshpu@yahoo.com]
Sent: Tuesday, February 26, 2002 12:40 PM
To: tomcat-user@jakarta.apache.org
Subject: IlligalStateException -- getOutputStream() has already been
called for this response.


Hello everyone.

I had posted a similar message before, but either did not get replies or 
missed them.

I am using a JavaBean in a JSP page. This bean draws charts and graphs 
depending on supplied data...

When I call the JSP page directly from the browser, the graph displays 
properly, and no error messages are dumped to catalina.out.

When I have a servlet forward to the JSP page, the graphs display 
properly, but I get a message in catalina.out: 
java.lang.IlligalStateException: getOutputStream() has already been 
called for this response.

When I have a servlet include the JSP page, I get garbage in the 
browser, and the same message in catalina.out, 
java.lang.IlligalStateException: getOutputStream() has already been 
called for this response.

I had seen posts regarding this error, and believe that I saw something 
in the bug databasee, but still no solution.
Is this behavior 'normal?' for JSPs / Servlets?

The bean that I am using to create the charts is called jspChart, and is 
at:  http://www.javaside.com/u_jspchart.html
This URL contains a sample JSP page, so any servlet that includes / 
forwards this page should produce above results.

I would apprecieate it if you could BCC me in your replies, to make sure 
I get the message.
Also, if you have any other solutions for creating charts/graphs 
dynamically, with the ability to include/forweard from servlets, I'll be 
more than pleased...

Thanks in advance!


Dmitry



--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>

--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message