Missing images issue while generating charts in html reports using JasperReports

Had been annoying thinking and googling the web for the solution, but finally got the breakthrough. Things went perfect when I opt for PDF reports, but could not find the images if the same report is exported to HTML.

Here is the fix:

The code that you wrote to generate pie or bar charts in HTML using JasperReports, you need to make sure you add the following lines in your web.xml

Further make sure, you set the ImageServlet attribute in your controller method as:

Make sure you have the following JRHtmlExporterParameter parameters set, as:

This is all. For the complete tutorial on JasperReports to HTML, click here.


For any queries, feel free to share.

Receive our updates to your inbox

Get more stuff like this
in your inbox

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.