Jfreechart Service: displaying test chart
"Louis Moore" <[email protected]> Thu, 27 May 2004 16:22:17 -0700
| Newsgroups | gmane.comp.java.keel.user |
|---|---|
| Message-ID | <C5E6D04B7C014946B7CCBFC2AF30DB62C096A4@corpmail01.corp.walmart.com> |
I'm trying to display the test chart (from TestChart.java) in the
jfreechart service package. I can do it fine by saving the chart in my
model and then accessing it with an img tag in my jsp, but it looks from
the way the response is being formed in the test code that there should
be another way to do it:
<snippet>
myResponse.addOutput("binary", cf.getChartEncoded("jpg", 400, 400));
myResponse.setAttribute("binary", "true");
myResponse.setAttribute("mimetype", "image/jpeg");
return myResponse;
</snippet>
I've tried manipulating the "binary" output in my jsp and all I've
managed to do so far is output the chart as a binary String.
Anyone know the correct way of doing this in jsp/struts?
Thanks,
Lou