Hello lizz,

i use the JRPdfResource this way. On bottom i added the output from the
sysouts. This is exactly the path where my jasper file is located. But it's
still empty. Can i output anything else, so that i see my mistake?

ServletContext context = ((WebApplication)
getApplication()).getServletContext();
final File reportFile = new File(context.getRealPath("/reports/booking
confirmation.jasper"));
System.out.println(reportFile.getAbsolutePath());
try {
  System.out.println(reportFile.getCanonicalPath());
} catch (IOException e) {
  e.printStackTrace();
}
final JRResource pdfResource = new JRPdfResource(reportFile);
Link pdf = new ResourceLink("pdf", pdfResource) {
  public void onClick() {
    super.onClick();
    // do some additional stuff
  }
};

The output is
14:41:50,041 INFO  [STDOUT]
C:\Programme\jboss-4.2.2.GA\server\default\.\tmp\deploy\tmp58981frontend-exp.war\reports\booking
con
firmation.jasper
14:41:50,041 INFO  [STDOUT]
C:\Programme\jboss-4.2.2.GA\server\default\tmp\deploy\tmp58981frontend-exp.war\reports\booking
confi
rmation.jasper

Thanks 4 your help
Per
-- 
View this message in context: 
http://www.nabble.com/Link-to-dynamic-pdf-%28jasperreports%29-tf4936362.html#a14212787
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to