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!
how to do jsp project with jfreechart
Re: how to do jsp project with jfreechart
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¶m2=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.
So my jsp has something like the following:
<img src="servlets/MyJfreeChartServlet?param1=foo¶m2=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.