the web.xml
<servlet>
<servlet-name>ImageServlet</servlet-name>
<servlet-class>net.sf.jasperreport.j2ee.
servlets.ImageServlet</servlet-class>
<url-pattern>/servlets/images</url-pattern>
</servlet>
Then you want to set the "JRHtmlExporterParameter.IMAGES_URI" parameter in your program .JRHtmlExporter jrHtmlExporter = new JRHtmlExporter();
jrHtmlExporter.setParameter(JRHtmlExporterParameter.IMAGES_URI,"../servlets/image?image=");