Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to read content of a webserver's folder? 1

Status
Not open for further replies.

frag

Programmer
Dec 7, 2000
321
GB
Hi all,

I want to read the content of a folder on a webserver with a java program. Is that possible at all?

Want I try to achive is that you can call the programm with a certain URL (like an it will display the folder's (xyz) content (all html-files, etc.).

I have tried URLConnection and File... both without success.

The idea behind this is that we have to manually check every morning if there is a new file that can be downloaded from a website and I want to automate this. The files are all in the same folder, but there is no ftp-access, just plain http.

Anybody done this before?

Cheers
frag

real_firestorm@gmx.de
 
When I query an URL which represents a directory (without index.html-file), I get a directory-listing in html-form sometimes like here:

and sometimes a 'access denied for directory-listing'.

Not far away from that, you find an open-source java program which is nearly doing what you want to program:


seeking a job as java-programmer in Berlin:
 
Thank you Stefan for your reply.

The directory-listing in html-form is exactly what I get and what I want to read (if I can't read the folder itself).

The program-description of htmlobserver sounds very promising, i will have a deeper look into the sourcecode as soon as I have enough time... but I am pretty sure that I will find just what I need. *thumpsup*

Thx

frag


real_firestorm@gmx.de
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top