importPackage(Packages.net.sf.jasperreports.engine); importPackage(Packages.net.sf.jasperreports.engine.data); importPackage(Packages.net.sf.jasperreports.engine.xml); importPackage(Packages.net.sf.jasperreports.engine["export"]); … var jasperDesign = new JRXmlLoader.load(getInputStream(documentURI)); var jasperReport = new JasperCompileManager.compileReport(jasperDesign); var jasperPrint = new JasperFillManager.fillReport(jasperReport, new Packages.java.util.HashMap(), dbConn); new JasperExportManager.exportReportToHtmlFile(jasperPrint, “myreport.html");
BTW the Rhino engine is an integral part of Apache Cocoon that supports continuations.
UPDATE: Read Stevey’s blog on “Rhino on Rails”
2 thoughts on “Lightweight, time-proven approach to Java scripting”
And for the more adventurous souls there is always Scala 🙂