Close
jGuru Forums
Posted By: Srividya_M Posted On: Friday, November 2, 2001 02:23 AM
I want to serve a pdf file from a servlet. But the problem is the file is not part of the web application folder but resides in another folder. please help.
Re: Serving file which is not in web application path from servlet
Posted By: Alex_Chaffee Posted On: Friday, November 2, 2001 07:47 AM
There are three directory trees you need to worry about:
To download a file from anywhere else -- including the webapp/WEB-INF under WEB-INF -- you need to call a servlet that opens the file and spits out the contents as described above.
Note that the user your servlet engine is running as must have permission to access that file, or you will get a server error.
Posted By: Luigi_Viggiano Posted On: Friday, November 2, 2001 02:30 AM