make files downloadable from outside tomcat(web) context
843838Oct 31 2006 — edited Nov 4 2006Hi there,
I made an application on whicht people can upload word/pdf files.
I put them in a dir called /opt/customer/2342/ , where 2342 is the customer id.
The files are stored there, because I don't want people to be able to just download the files by using http://www.blahblah.com/customer/2342
Now I want to create a servlet or jsp file that is able to make the files downloadable for specific users.
Of course I can find the files using java.util.File. But I don't have a clue how to make them downloadable from this path. Should it be something with a FileStream... ?? And adding the mime-type?
Can anybody give me some hints on making files downloadable from a specific dir?
Thanks in advance.
Jeroen van Hertum