I am currently developing my first struts-based web application. So far so good until I tried to display a Jasper report - mass headaches!
I have used iReport to produce a compiled .jasper file but I cannot seem to access it at all.
I am getting file not found errors all over the place!
My code (version 565!) is:
File reportFile = new File("/reports/TestThree.jasper");
String path = reportFile.getPath(); //tried getAbsolutePath()
Map parameters = new HashMap();
parameters.put("TourID", "INV 55");
JasperPrint jasperPrint = JasperManager.fillReport ( path,parameters, conn);
My folder (records) is directly under the root folder.
Does anyone have any suggestions or any example code of running a Jasper report in the struts environment?