Search code examples
javaurlwebserver

Java list files in URL directory?


Is this possible? Can I make a folder on my webserver named /gamelevels/ with .gamelevel extension, point a URL there and retrive all the .gamelevel files from there? Nothing like this seems to exist in java (googling/SO).


Solution

  • Some servers are configured to provide an HTML listing of contents when the URL of a directory is provided. If the server supplies that list, the client can parse the list for the contents.

    It is considered a security hole for a server to provide that listing.