Java : Display list of directories and files on the server through a web page
문제
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.
해결책
- web page can display everything
- if you wish to create list of file on the server you need server side code
- 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.
제휴하지 않습니다 StackOverflow