We are using Struts based framework. We want to configure struts with JasperReport to fulfill some printing requirements.
In order to print the report we need to provide Response Outputstream to JasperReport.
We have written following lines of code in Action class for this purpose. e.g. JRHtmlExporter exporter = new JRHtmlExporter(); exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, this.response.getOutputStream()); exporter.exportReport();
Jasper report is supposed to write onto this OutputStream, but it throws following runtime error.