ServletOutputStream

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
behofmann
Posts: 6
Joined: Thu Apr 19, 2007 2:53 pm

ServletOutputStream

Post by behofmann » Wed Oct 14, 2009 1:30 am

I'm using the JFreeChart ChartUtilities.writeChartAsPNG to display my charts using JSPs. I'm now receiving the following errors:

java.lang.IllegalStateException: getOutputStream() has already been called for this response

java.lang.IllegalStateException: Cannot reset buffer after response has been committed

This worked fine with previous versions of Java. Now anytime I do a getOutputStream from the response object I get the above errors when trying to display my charts.

Using out.clear() and out = pageContext.pushBody() in my JSP eliminates the errors above, but I'm still having problems displaying charts from my servlet.

Any help, examples, or advice would be greatly appreciated.

Thanks,

Brandon

raj_jfree
Posts: 20
Joined: Tue Sep 29, 2009 8:32 am
antibot: No, of course not.

Re: ServletOutputStream

Post by raj_jfree » Wed Oct 14, 2009 2:45 am

U can refer this thread ..but i have done it using spring MVC controller
i think it may help you...

http://www.jfree.org/phpBB2/viewtopic.php?f=3&t=29303

Locked