0

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.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
cdaiga
  • 4,861
  • 3
  • 22
  • 42
  • @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 Answers1

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?

Community
  • 1
  • 1
Gaël J
  • 11,274
  • 4
  • 17
  • 32