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.
Re: Serving file which is not in web application path from servlet
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.
Friday, November 2, 2001 02:30 AM