Can be a ClassLoader problem. JasperReports uses a custom ClassLoader do load resources.


Kalpesh Chordia wrote:
Images not displaying in websphere


I am running JasperReports 0.5.2 in RedHat Linux + Ibm WebSphere environment. In my report, I have included images in page header and footer sections.

When I export jrprint file to HTML, I am not able to see all the images on all the generated pages. They appear properly on first page only and from second page, images do not appear. The behavior is very inconsistent. I need to right click on the image and select show picture option to get the image and that to twice for each disappeared image.

The same report with all the images on all the pages work fine under Windows 2000 + Weblogic environment.

Is JasperReports not 100% compatible with IBM WEB SPHERE ? OR do I need any thing extra ?

My HTML Exporter code written in JSP is as follows.
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_STRING_BUFFER, sbuf);
exporter.setParameter(JRHtmlExporterParameter.HTML_FOOTER," ");
exporter.setParameter(JRHtmlExporterParameter.IS_USING_IMAGES_TO_ALIGN, Boolean.FALSE);
Map imagesMap = new HashMap();
request.getSession().setAttribute("IMAGES_MAP", imagesMap);
exporter.setParameter(JRHtmlExporterParameter.IMAGES_MAP, imagesMap);
exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, "../../../view/platform/report/image.jsp?image=");