Hi,
When the users clicks on a certain link...i am creating a chart, saving it to a particular directory and then displaying them.
But after I have done this my page(jsp) is taking a long time to display.
Actually I do not want to create a file...can I have the chart displayed directly..
Thanks
Page taking longer time after adding charts
-
- Posts: 115
- Joined: Fri Mar 14, 2003 3:13 pm
- Location: London, England
- Contact:
Not writing image to disk
There are methods in the ChartUtilities class for writing directly to an OutputStream - like response.getOutputStream(). However I would consider add some logging messages to benchmark your code to confirm where the bottleneck is before doing too much work. You may find the cost of writing the chart to disk and re-retrieving it is small compared to, for example, database access.
Regards,
Richard...
Regards,
Richard...
All you have to do is to fill the response of the servelt with the chart
Code: Select all
ChartUtilities.writeChartAsPNG(response.getOutputStream(), chart, 200, a);