If I go by your way (url reference instead of physical file path), then images won't appear in pdf/excel version of report.
 
Please correct me if I am wrong.
-----Original Message-----
From: Kailasam, Karuppaiah [mailto:Karuppaiah.Kailasam@aig.com]
Sent: Monday, February 21, 2005 5:01 AM
To: Kalpesh Chordia; 'Giulio Toffoli'; 'teodord@users.sourceforge.net'
Cc: jasperreports-questions@lists.sourceforge.net; 'teodord@hotmail.com'
Subject: RE: [jasperreports-questions] Images not displaying in websphere

Just a different thought on this, could you please explain why you want to load the image through jsp ?

 

If you could separate images from the application and setup a different url for images like http://test-server/images/  and the images dir can hold all the images that you are referring in the HTML export.

 

I think this approach will make the process a lot easier and no need to worry about loading the resource from your own classes.

 

Hope this helps, please let me know if it make sense.

 

Thanks

Karup.

 


From: jasperreports-questions-admin@lists.sourceforge.net [mailto:jasperreports-questions-admin@lists.sourceforge.net] On Behalf Of Kalpesh Chordia
Sent: Saturday, February 19, 2005 4:20 AM
To: 'Giulio Toffoli'; 'teodord@users.sourceforge.net'
Cc: jasperreports-questions@lists.sourceforge.net; 'teodord@hotmail.com'
Subject: RE: [jasperreports-questions] Images not displaying in websphere

 

For the Parameter IMAGES_URI, I am setting the path of image.jsp .

exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, "../../../view/platform/report/image.jsp?image=");

 

Instead of using Image.jsp, if I use ImageServlet.class, will it help to fix the image displaying issue ?

 

How do I use ImageServlet.class in my below jsp code ?

 

Thanks,

Kalpesh

 

 

-----Original Message-----
From: Kalpesh Chordia [mailto:kchordia@egain.com]
Sent: Friday, February 18, 2005 10:29 PM
To: 'Giulio Toffoli'; jasperreports-questions@lists.sourceforge.net
Subject: RE: [jasperreports-questions] Images not displaying in websphere

Hello Giulio,

 

Thanks for your quick response. Could you please explain me the problem and its solution in more details as this is very urgent and I can not deliver it without fix.

 

Thanks in advance.

Kalpesh

 

-----Original Message-----
From: Giulio Toffoli [mailto:gt@businesslogic.it]
Sent: Friday, February 18, 2005 10:17 PM
To: jasperreports-questions@lists.sourceforge.net
Subject: Re: [jasperreports-questions] Images not displaying in websphere


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

Giulio

Kalpesh Chordia wrote:

Hi,

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=");
exporter.exportReport();

Thanks,
Kalpesh