0

I am working on a feature where i have to provide a direct link to download certain files. all my files are in htdocs folder and i want to provide a direct link to download them like

webapp.com/files/file1.avi

  1. could write a servlet and send the user a file.I know how to do it.
  2. The other way is that if i directly go to webapp.com/files i should be able to see all of the files present in the directory. How do i do that? do i have to make any server config changes to achieve it?

the webapp is running on Apache tomcat and jdk 1.4

oortcloud_domicile
  • 840
  • 6
  • 21
  • 41
  • Are you read yet this questions: [http://stackoverflow.com/questions/55709/streaming-large-files-in-a-java-servlet] and [http://stackoverflow.com/questions/18577307/video-download-stream-using-java-servlet] ? – alepuzio Oct 31 '13 at 17:23
  • Thank you for the reply. i already know how to do it. but if you look at my second point i ask the real question there. :) – oortcloud_domicile Oct 31 '13 at 17:39

1 Answers1

0

You can directly serve your static content from tomcat(if it is your app server) root directory. I assume other app/web servers will have a static content directory as well.

Karthik
  • 1,005
  • 8
  • 7