We are attempting to pre-render a report and store it away for later use. The report will be run around 350 times with different parameters and the HTML will be stored in a database. We are doing this because we already have the infrastructure to generate the reports in such a fashion and also because the report takes a long time to process. The issue comes in with the images related to the report. The report has 6 charts in it which have to be rendered as PNG images. In my testing the images are saved in '/tmp' and the generated HTML contains URLs of the form src="file:/tmp/custom29.png". This, of course, is unusable on a client's browser, so I'd like to point to a URL that is servable on our end. I tried setting rendering options like so:
HTMLRenderOption options = new HTMLRenderOption();
options.setAppBaseURL("
http://somehost/someplace");
options.setBaseImageURL("
http://somehost/someplace");
options.setBaseURL("
http://somehost/someplace");
None of these options appears to change the generated HTML; it always contains a "file:" URL. Am I doing something wrong? How can I get the HTML to point to a location where I can store the chart images? Is there a better solution? Thanks in advance.