Pergunta

I want to implement something as follows:

The user uploads different types of files on the server. My requirement is to display the list of all the files and directories on the server using a web page.

Is it possible to display the list of files / directories on the server using a web page.

If yes, then would it be a client side script or server side script.

Any sample code link, if possible, would be great help.

Thanks.

Foi útil?

Solução

  1. web page can display everything
  2. if you wish to create list of file on the server you need server side code
  3. You should write recursive method that traverses over tree of directories and files using java.io.File API.

Examples:

http://www.javapractices.com/topic/TopicAction.do?Id=68

Recursively list files in Java

etc, etc

Outras dicas

A server-side script. Or even just use Apache's directory index.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top