i got a problem while running jrxml file from jsp page.
i have written code to compile jrxml file, run the file and export to pdf.
the code is running fine, pdf file is also generating...but pdf is not displaying while sending the request, it is not taking the path of pdf file...
i have given exact path.....but it is not taking....
i tried in somany ways but no use.......
please help me..i need it urgent.
here is my code of jsp
Expand|Select|Wrap|Line Numbers
- try{
- String destrep="C:/ReportsPDF/Report.pdf";
- Map parameters = new HashMap();
- parameters.put("SUBREPORT_DIR","C:/Reports/");
- JasperDesign jasperDesign = JRXmlLoader.load(ReportFile);
- JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);
- JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, con);
- JasperExportManager.exportReportToPdfFile(jasperPrint,destrep);
- response.sendRedirect(destrep);
- con.close();
- rs.close();
- }
but it is not displaying it is giving me the error like
Expand|Select|Wrap|Line Numbers
- type Status report
- message /ReportProj/Pages/C:/MSReportsPDF/Report.pdf
- description The requested resource (/ReportProj/Pages/C:/ReportsPDF/Report.pdf) is not available.