wood burning stoves 2.0 *
The moose likes Servlets and the fly likes list directory as links for client download of files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "list directory as links for client download of files" Watch "list directory as links for client download of files" New topic
Author

list directory as links for client download of files

Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4347
    
    2

im not sure if this is best forum for this question but im wondering how to make the files in one of my folders available to my servers visitors. I could use a servlet but im thinking there might be an easier way?
since the file extension is one that wont get displayed clicking a link will open a file download dialog
I have Apache/tomcat/php server
I have seen directories displayed as links at other sites.


SCJP
Visit my download page
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16315
    
  23

In apache, if you simply want to make all files in a directory accessible, set up a virtual directory in httpd.conf and point it at the real directory. You can also determine what files actually get displayed, what icons are used in a web directory page, etc. Check the apache docs. Java never gets involved.


Customer surveys are for companies who didn't pay proper attention to begin with.
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4347
    
    2

Thanks Tim,
I suspected I could do something like that.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: list directory as links for client download of files