aspose file tools
The moose likes Sockets and Internet Protocols and the fly likes Display all files in an online folder? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply Bookmark "Display all files in an online folder?" Watch "Display all files in an online folder?" New topic
Author

Display all files in an online folder?

Mr P Bradders
Greenhorn

Joined: Mar 15, 2006
Posts: 1
How would I go about obtaining the file names of all files in an online folder. Eg. the user enters http://www.myurl.com/myfolder/ and all files in this folder are obtained?

Regards.
Jason Moors
Ranch Hand

Joined: Dec 04, 2001
Posts: 188
It depends what you are trying to do....

1) If you are trying to develop a client application which connects to a web server you would need to configure the web server to provide directory listings. Generally this is disabled as it is a security risk.

2) If you are trying to develop a server application which provides directory listing, you need to write an simple application which uses java.io.ServerSocket and creates a Thread for each connection which would get the directory listing a pass the list back as an html string.

Jason.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Display all files in an online folder?
 
Similar Threads
Custom URL alias in Tomcat 4.0.1
File Reading Error
Why tomcat always show me the directory list
HTTP status 404
WebApp viewing Linux folder outside app