I am writing an update page in JSTL where the user inputs some numbers. I then call a java bean - passing the numbers as parameters - which, using JFreeChart, creates a PNG
I would suggest that you use the ServletUtilities class. It saves in the java tempdir AND cleans up when the session is invalidated. :) Another hint for then displaying the file is to use the DisplayChart servlet to get your images. This goes in web.xml
DisplayChart
org.jfree.chart.servlet.DisplayChart
DisplayChart
/servlet/DisplayChart
This is then how you display the image using jstl: