How to get list of files from http server using beans.

S

szymex

I must to get a list of files which are under http address. Could you give
me some advice? I heard that beans could help me.
 
C

Christophe Vanfleteren

szymex said:
I must to get a list of files which are under http address. Could you give
me some advice? I heard that beans could help me.

You can't. There's no such thing as a list of files as far as http is
concerned.

You could get the URL's out of an autogenerated index page though.
Just retrieve that page first, and then retrieve all the URL's in that page.

To actually retrieve those files, look at the java.net.* classes, or
http://jakarta.apache.org/commons/httpclient/
 
J

Johan Poppe

szymex skrev:
I must to get a list of files which are under http address. Could you give
me some advice? I heard that beans could help me.

That depends on what you actually want.

If you want to make something (for example a bean) which retrieves a
list of files from any http server, my advice is "forget it".

If you want to create something on a http server (for example using
beans) that hands out a list of files in one or more directories on
the server, my advice is "just go ahead and program".
 
S

szymex

Uzytkownik "Johan Poppe said:
szymex skrev:


That depends on what you actually want.

If you want to make something (for example a bean) which retrieves a
list of files from any http server, my advice is "forget it".

If you want to create something on a http server (for example using
beans) that hands out a list of files in one or more directories on
the server, my advice is "just go ahead and program".

Yes, I want it (last point), but I need advice how to start etc.
 
R

Roedy Green

I must to get a list of files which are under http address. Could you give
me some advice? I heard that beans could help me.

You can send the server a dir and it has the option of sending you a
directory list, but more commonly it will send you the contents of
index.html. In general, it is none of your business.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,434
Messages
2,571,690
Members
48,796
Latest member
Greg L.

Latest Threads

Top