Hi,
I need to get the list of files in a particular folder on a web server.
Assuming that I have the read access to the server, how do I do this??
Example: I need to find out all the files at
http://www.example.org/folderA/folderB/
Does anyone know the code in JAVA??
- Amit
Hiran Chaudhuri - 20 Jan 2006 06:36 GMT
> Hi,
> I need to get the list of files in a particular folder on a web server.
[quoted text clipped - 5 lines]
> Does anyone know the code in JAVA??
> - Amit
new java.io.File(getServletContext().getRealPath("/folderB")).list()
This requires that the code runs in the web application server for context
folderA, but you did not mention it must not....
Hiran Chaudhuri