Unable to Include Images in the HTML file
Hi All,
Iam working on the OC4j standalone server,I am working on struts
technology,where in my jsp i have an Export button when I click that
the following code is executed.
else if (searchUsersBean.getOrgFormat().equals(HTML)) {
/*JasperCompileManager.compileReportToFile(ConfigManager.getJasperReportXML());*/
File reportFile = new File(ConfigManager.getJasperReport());
if (!reportFile.exists())
throw ExceptionUtil.getCSMSException(new Exception(), 9);
JasperReport jasperReport = (JasperReport) JRLoader
..loadObject(reportFile.getPath());
Map parameters = new HashMap();
parameters.put(REPORT_TITLE, USER_REPORT);
parameters.put(BASE_DIR, reportFile.getParentFile());
parameters.put(IMAGE_PATH, ConfigManager.getAcpLogo());
request.getSession().setAttribute(R_PARAMETER, parameters);
JRBeanCollectionDataSource ds = new JRBeanCollectionDataSource(
userList);
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport,
parameters, ds);
JRHtmlExporter exporter = new JRHtmlExporter();
request.getSession().setAttribute(ImageServlet.DEFAULT_JASPER_PRINT_SESSION_ATTRIBUTE,
jasperPrint);
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
PrintWriter out = response.getWriter();
exporter.setParameter(JRExporterParameter.OUTPUT_WRITER, out);
exporter.exportReport();
}
The report is being executed but in the html file the images are not
properly included,Can any one help me out on this how to include the
images for an HTML format...
Thanks & Regards
Praveen Kumar.P