How can I download a file found out of the servlet context using Primefaces/JSF? I already know how to download a file found in the servlet context, and in a package, but will like to know how to do the download when the file is out of the servlet context.
Asked
Active
Viewed 841 times
0
-
@Gaël what I mean is getting a file found on a drive on the server where the application is deployed and make it downloadable using JSF! – cdaiga Oct 12 '15 at 16:17
1 Answers
0
What I would do is get the file as an InputStream
and pass that stream to the response using JSF methods (ResponseOutputStream
or something like that).
See: How to provide a file download from a JSF backing bean?