Sorry for the cross post in the forum "Desigining BIRT reports". I think this forum is more appropriate.<br />
<br />
I deployed my BIRT engine on Websphere 6.<br />
I developed a report which points to 2 images on an image directory.<br />
<br />
When I generate the report in HTML mode, I am not able to see the image.<br />
An "X" is shown on the HTML page. So, I right-click and copy the image URL link and try to paste it into IE, it showed me with a HTTP 405 Resource not allowed error. (the image is generated in the server directory with something like file785678561207c87ed252.jpg and the URL is referenced it correctly)<br />
<br />
<a class='bbc_url' href='
http://localhost:90811/MyApp/reports/images/file785678561207c87ed252.jpg'>http://localhost:90811/MyApp/reports/images/file785678561207c87ed252.jpg</a><br />
<br />
BUT, if I generate the report in PDF mode, I am able to see the image in my report. These reports are generated from the servlet.<br />
<br />
It will be great if someone can help me on this. Many thanks.<br />
<br />
Below is the code snippet that I have in my code:<br />
<br />
HTMLRenderOption options = new HTMLRenderOption();<br />
ByteArrayOutputStream out = new ByteArrayOutputStream();<br />
options.setOutputStream(out);<br />
options.setActionHandler(new HTMLActionHandler());<br />
options.setImageHandler(new HTMLServerImageHandler());<br />
<br />
// set output options<br />
if (reportFormat.equalsIgnoreCase(BirtConstants.HTML_FORMAT)) { <br />
options.setOutputFormat(HTMLRenderOption.OUTPUT_FORMAT_HTML);<br />
} else if (reportFormat.equalsIgnoreCase(BirtConstants.PDF_FORMAT)) {<br />
options.setOutputFormat(HTMLRenderOption.OUTPUT_FORMAT_PDF);<br />
} else if (reportFormat.equalsIgnoreCase(BirtConstants.XLS_FORMAT)) {<br />
options.setOutputFormat(BirtConstants.XLS_FORMAT);<br />
} else { <br />
options.setOutputFormat(HTMLRenderOption.OUTPUT_FORMAT_HTML);<br />
}<br />
options.setImageHandler(new HTMLServerImageHandler());<br />
options.setImageDirectory(servletContext.getRealPath("/reports/images"));<br />
options.setBaseImageURL("reports/images/");<br />
options.setActionHandler(new HTMLActionHandler());