how to do jsp project with jfreechart

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
davidtim

how to do jsp project with jfreechart

Post by davidtim » Thu May 16, 2002 6:09 am

i have try more times with jfreechart to make my project in jsp .becuase it fail ,because it show error about this"IllegalStateException occurs"
i saw it about title before ,but it doesn't save this problem ,who know how to save it? please let me know ,thank you very much!

Michael T

Re: how to do jsp project with jfreechart

Post by Michael T » Thu May 16, 2002 5:23 pm

I haven't solved the problem myself. Instead I just worked around it by using a servlet to write the chart. Take a look at the servlet demo code. It is fairly straighforward.

So my jsp has something like the following:

<img src="servlets/MyJfreeChartServlet?param1=foo&param2=bar">

Works fine for me. In fact, for quick debugging and chart building, I build the chart in the jsp, put it into the session and then retrieve the chart from the session in the servlet. This is not necessarily the best way but it is good for quick changes.

Locked