当前位置:编程学习 > JAVA >>

List the directories and files on the server by a java web application

I am a fresh developer with the Web application and java.

My purpose as below:

   1. List the directories and files that on the server by a java web application.
   2. Create a tree of the dir and files on the web page.
   3. Once click on the one of the file in the tree, it will use flash player to paly the file.(actually, all the files are flash file *.swf).

Any suggestion is helpful. thanks. --------------------编程问答-------------------- 大概的思路是,先加载指定目录下面的所有文件夹,形成树的第一层,然后每次点击一个树节点,获取选中的文件,根据File类可以获取其下面的所有子文件夹,这样可以生成树的下一级,以此类推,可以形成一颗完整的树,当点击的树节点是叶子节点,也就是文件的时候,打开一个新的页面,把当前文件的路径传过去,在新页面中用flash播放 --------------------编程问答-------------------- Dtree Xtree Ztree and so on, can show the files tree.
However,using flash player to play the file,I have no idea. --------------------编程问答--------------------
引用 1 楼  的回复:
大概的思路是,先加载指定目录下面的所有文件夹,形成树的第一层,然后每次点击一个树节点,获取选中的文件,根据File类可以获取其下面的所有子文件夹,这样可以生成树的下一级,以此类推,可以形成一颗完整的树,当点击的树节点是叶子节点,也就是文件的时候,打开一个新的页面,把当前文件的路径传过去,在新页面中用flash播放


谢谢你的快速回复。

基本思路我还是知道,用File类我也知道,就是不知道下面两点:
1. 怎么把file类取出来的文件列表用一个Tree的形式放在web页面上去
2. 当用户点击某个文件时怎么把具体flash文件的地址传给flashplayer.

因为我是web新手,所以很多html(jsp)方面的不懂。 --------------------编程问答-------------------- 原来会说中国话啊...... --------------------编程问答--------------------
引用 4 楼  的回复:
原来会说中国话啊......


因为在stackoverflow上发过这个问题,我就直接copy过来了,懒得翻译请见谅。
补充:Java ,  Web 开发
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,