문제

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.

도움이 되었습니까?

해결책

  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

다른 팁

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top