Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to list files from a remote folder using a URL.

Melssj5Mar 23 2009 — edited Mar 23 2009
Hi, I am making my Thesis project and I have this problem anda just cant solve it. I must list the files from a solder on a web server.

for example lets say I have my web app:

SS3D/jsp/images/textures/img1.jpg
SS3D/jsp/images/textures/img2.jpg
SS3D/jsp/images/textures/img3.jpg

and from an applet on a local machine I need to list the files inside http://localhost/SS3D/jsp/images/textures/

I have tried using a File (uri).list () But, I am getting an Exception that the uri is not a file.

I have also tried File (String urlpath).list () But I am getting a NullPointerException when calling to list.

Is there anyway to do the trick, I was thinking on keeping a txt file on the web server with all the images listed on it but I dont want to care about keeping upgraded this txt file. Any clues? Thanks in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 20 2009
Added on Mar 23 2009
4 comments
581 views