0

Following is the detailed scenario:

I am working on a Java web project. In that some operation generates a chart at runtime using jfreechart API and then I am able to see the chart on some other JSP page. When I run the application from inside Eclipse IDE, the image gets showed up but when I try it using any web browser, the image doesn't show up.
I think that it is something related to the path. So, I wish to know whether there is any way to store a dynamically generated image file inside WebContent folder.
Or if it is happening because of some other issue please enlighten me.

Thanks.

Mr. Elusive
  • 498
  • 3
  • 8
  • 1
    Instead of saving a file, why not stream the image using `ChartUtilities.writeBufferedImageAs*()`? – trashgod Feb 22 '13 at 20:04
  • 1
    The WebContent folder is the folder where the source files of you app, on your decelopment machine, are stored. It doesn't exist at runtime, in the deployed application. You'll need to stream the images directly from JFreeChart, or store them in some directory outside of the webapp's folder, and stream the files from this directory. – JB Nizet Feb 22 '13 at 23:02
  • @Mr.Elusive: Glad you got it sorted. You can [answer your own question](http://meta.stackexchange.com/q/17463/163188). – trashgod Feb 24 '13 at 02:28

0 Answers0