How to retrive the folder structure on the server and display on an applet on the client side.

B

bala

I have to retrieve the directory structure on the server and display it
to the user. Once the user selects a folder from the tree, the files
have to load on a different pane. Of course the folder structure could
change on the server if any folder or file is added. In short, i have
to get something like the windows file explorer. Is it possible to do
this with applet alone or use servlets. If we can do this using
servlets, how can i retrieve the folder structure and send it to the
applet which will be the user interface?
 
D

Dag Sunde

bala said:
I have to retrieve the directory structure on the server and display it
to the user. Once the user selects a folder from the tree, the files
have to load on a different pane. Of course the folder structure could
change on the server if any folder or file is added. In short, i have
to get something like the windows file explorer. Is it possible to do
this with applet alone or use servlets. If we can do this using
servlets, how can i retrieve the folder structure and send it to the
applet which will be the user interface?

* A servlet on the server that takes a root-foldername as input, scans,
and build a (ie. xml) string representing the folder-structure.
* In the Applet, a method that executes an HTTP POST to the servlet.
When the returned string response are available, parse it, and
build a three in the applet.

Of course, this will be "pull", and will not automatically detect
changes in the servers forlder-structure.
 
B

Big Jim

Dag Sunde said:
* A servlet on the server that takes a root-foldername as input, scans,
and build a (ie. xml) string representing the folder-structure.
* In the Applet, a method that executes an HTTP POST to the servlet.
When the returned string response are available, parse it, and
build a three in the applet.

Of course, this will be "pull", and will not automatically detect
changes in the servers forlder-structure.
Would it be possible in this case to allow the applet to "register" itself
with the server and provide an update method that the server will call via
rmi when it's updated as in the Observer patteren? I'm wondering if this is
possible with respect to security restrictions?
 
S

Stefan Schulz

Would it be possible in this case to allow the applet to "register"
itself with the server and provide an update method that the server
will call via rmi when it's updated as in the Observer patteren? I'm
wondering if this is possible with respect to security restrictions?

I am not sure about the RMI part, but in principle it is possible. If
RMI is not available, just use another protocol.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top