I am generating a pdf file from a database data. I want to store the file in webapp/resources so that I can have a relative link for my pdf to put it in my jsf page. Please let me know if there is a way to store pdf in relative path (webapp/resource)
Asked
Active
Viewed 203 times
0
-
1I assume you deploy a war file and the generated pdfs must survive an webapp update. You should store the pdfs outside the webapp folder and use a method mentioned here. http://stackoverflow.com/questions/1812244/simplest-way-to-serve-static-data-from-outside-the-application-server-in-a-java – Hank Lapidez Jul 23 '15 at 19:14
-
The answer depends on whether you intend it to be a permanent file, or a temporary file. In case it's a temporary file, it depends further on whether you intend the enduser to be able to download it only once, or for the entire remainder of the session. – BalusC Jul 24 '15 at 05:38