JFreeChart Servlet / JSP Enhancements
Last Updated on Monday 14th June 2004 for JFreeChart version 0.9.20

JFreeChart contains a number of features that are designed for use in a servlet / JSP environment. These features include:

  • Charts with tooltips (that work with the latest versions of Internet Explorer, Netscape, Mozilla and Opera)
  • Charts with drill down capabilities using custom URLs
  • Utility class to simplify persisting charts into the temporary directory
  • Generic servlet to stream charts created in the temporary directory to the user that created them
  • Automatic deletion of charts that were created by users whose sessions have expired or have been explicitly abandoned

There is a WAR file (jfreechart-sample.war) available for download which demonstrates the new functionality and should run on any JSP 1.1 compliant servlet engine. Read the documentation for your servlet engine on specific details of how to deploy a WAR file but basically putting it in the webapps directory and restarting the servlet engine should do it. Then go to http://your-server-name/jfreechart-sample to view the examples.

Alternatively take a look at ImageMapDemo1-7 in the org.jfree.chart.demo package which can be run without a servlet environment.

If you have trouble downloading the WAR file and just get garbage in your web browser try right clicking on the link and selecting "Save Target As...", or something similar to get a file download dialog.

Below is a static sample showing a chart with a fully functional image map that was generated by JFreeChart. I can't show a dynamic sample as I don't have an internet accessible servlet engine available to me.

Sample Graph with href and title tags

I hope you find the functionality useful.

Richard Atkinson