The file really ought to reside in another location, but anyway...
I think new File("test.pdf") would actually indicate a file named test.pdf, at the current working directory of the application server. Output the file's path with getCanoicalPath/getAbsolutePath (or something along that line) to verify that the path of the pdf is correct first.


On 26 Nov 2007, at 6:07 PM, mbelarbi wrote:


opps, sorry what i meant to write was:
File pdfFile = new File("test.pdf");

But this doesn't really change much and the problem still remains that the
file is empty (whether txt or pdf).


mbelarbi wrote:

Hi,

I have some code that generates a pdf report file (using jasper reports).
This file is stored somewhere in the project.

What I need to do is be able to provide a link which makes that file
available for download when clicked (downloadLink?). How do i do this
using wicket? and are there any examples.

I've tried this:

File pdfFile = new File("test.txt");
DownloadLink dLink = new DownloadLink("dLink", pdfFile);


This does exactly what i am looking for (bring up a file for download), but this file is empty, it has no content. This pdf file resides in the
same hierarchy as the source code file.


--
View this message in context: http://www.nabble.com/wicket-File- downlaod-tf4874269.html#a13946991
Sent from the Wicket - User mailing list archive at Nabble.com.


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





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

Reply via email to