MarteJ
asked on
Traversing server side directories and files in client applications
Hi!
I was wondering if there is any built in features in Java to support traversing of directories and files? For example a structure that takes the path to the root directory as an argument and gets control over subfiles and subdirectories.
I am currently working on a client application, which will open and store files on a remote server using servlets. Consequently I have to pass the file structure from the server to the client when the user wants to open and save a file in order for him/her to navigate the server side directories on the client side. The client program currently uses JFileChooser for this purpose, but it can't see the files on the server so I will have to pass them over somehow.
I am also considering the java implementation of WebDAV, namely Jakarta Slide to handle the file management, but I am not sure about the complexity of integrating it with the rest?
Any thoughts regarding these issues?
Thanks for any help on this!
I was wondering if there is any built in features in Java to support traversing of directories and files? For example a structure that takes the path to the root directory as an argument and gets control over subfiles and subdirectories.
I am currently working on a client application, which will open and store files on a remote server using servlets. Consequently I have to pass the file structure from the server to the client when the user wants to open and save a file in order for him/her to navigate the server side directories on the client side. The client program currently uses JFileChooser for this purpose, but it can't see the files on the server so I will have to pass them over somehow.
I am also considering the java implementation of WebDAV, namely Jakarta Slide to handle the file management, but I am not sure about the complexity of integrating it with the rest?
Any thoughts regarding these issues?
Thanks for any help on this!
Unless the server is on your network, you're looking at FTP or WebDAV.
You might like to look into WebdavSystemView.java for JFileChooser
Not sure what stage this code is at:
http://cvs.apache.org/viewcvs.cgi/jakarta-slide/webdavclient/clientlib/src/java/org/apache/webdav/ui/WebdavSystemView.java?view=markup
http://cvs.apache.org/viewcvs.cgi/jakarta-slide/webdavclient/clientlib/src/java/org/apache/webdav/ui/WebdavSystemView.java?view=markup
ASKER
The server is on the same network. Is WebDAV the best solution, or is there any other way to retrieve a directory structure from the server to the client application, which is launched through a web application with Java Web Start?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
:-)