Directory Upload

C

Chow

Hello Gurus,

I am trying to develop a web application(might consider EJB's too
but don't see much point for the purpose this of application) which
will allow users to upload a directory (not a single file) from
client-side to the server. I have been going through the API and
discussion groups but couldn't find anything interesting. I wanted to
ask you people for suggesitions about this,

Is there a way that without using applets and just using plain
http and java based (servlets, jsp, and beans) application that we can
access the client side file system and get a handle and then move the
data to the server side. I am totally new to this part of the server
programming and it is a total gray area for me. Please do emphasis on
any thoughts you think might be useful. And this is not a school
project or for my work, but I did file upload tool recently, and it
just struck me if I can do a directory upload also as a simple web
application without using any applets. Really appreciate any feedback
about this. please do let me know, Thank you very much in advance
everyone.

Cheers,

Chow.
 
A

Anton Spaans

Chow said:
Hello Gurus,

I am trying to develop a web application(might consider EJB's too
but don't see much point for the purpose this of application) which
will allow users to upload a directory (not a single file) from
client-side to the server. I have been going through the API and
discussion groups but couldn't find anything interesting. I wanted to
ask you people for suggesitions about this,

Is there a way that without using applets and just using plain
http and java based (servlets, jsp, and beans) application that we can
access the client side file system and get a handle and then move the
data to the server side. I am totally new to this part of the server
programming and it is a total gray area for me. Please do emphasis on
any thoughts you think might be useful. And this is not a school
project or for my work, but I did file upload tool recently, and it
just struck me if I can do a directory upload also as a simple web
application without using any applets. Really appreciate any feedback
about this. please do let me know, Thank you very much in advance
everyone.

Cheers,

Chow.

I've never seen this implemented by any browser. A browser can upload as
many files in one request as it wants to. The HTTP protocol allows that. But
I know of no browser that actually implements that functionality, by either
let you select multiple files at the same time or selecting a directory. I
guess the only option left is to write a plug-in
(applet/ActiveX/Netscape-plugin/etc) for the browser.

-- Anton.
 
M

Matt Humphrey

Chow said:
Hello Gurus,

I am trying to develop a web application(might consider EJB's too
but don't see much point for the purpose this of application) which
will allow users to upload a directory (not a single file) from
client-side to the server. I have been going through the API and
discussion groups but couldn't find anything interesting. I wanted to
ask you people for suggesitions about this,

Is there a way that without using applets and just using plain
http and java based (servlets, jsp, and beans) application that we can
access the client side file system and get a handle and then move the
data to the server side.

I take it by java-based application that you mean server-side application.
Client-side Java application (not applet) can do whatever it wants. In
HTML, there is the <input type=file /> tag which provides the user with a
button for selecting a file, but I don't think it works with directories.
Client-side JavaScript isn't any better as it is also forbidden for security
reasons from reading users files or directories. You're going to need some
kind of applet / application / plug-in.

Cheers,
Matt Humphrey (e-mail address removed) http://www.iviz.com/
 
M

Missaka Wijekoon

No browser will let you do this be default. Even a java applet will
prevent local files being from read. The only practical way to do this
is to write a signed applet that has access to the local file system.
Even then, the user will have to grant access (the sandbox will request
from the user that your applet is seeking permission to try to access
privileged resources) . The applet can then read the directory and
upload all the files in it.

-Misk
Hello Gurus,

I am trying to develop a web application(might consider EJB's too
but don't see much point for the purpose this of application) which
will allow users to upload a directory (not a single file) from
client-side to the server. I have been going through the API and
discussion groups but couldn't find anything interesting. I wanted to
ask you people for suggesitions about this,

Is there a way that without using applets and just using plain
http and java based (servlets, jsp, and beans) application that we can
access the client side file system and get a handle and then move the
data to the server side. I am totally new to this part of the server
programming and it is a total gray area for me. Please do emphasis on
any thoughts you think might be useful. And this is not a school
project or for my work, but I did file upload tool recently, and it
just struck me if I can do a directory upload also as a simple web
application without using any applets. Really appreciate any feedback
about this. please do let me know, Thank you very much in advance
everyone.

Cheers,

Chow.


--
========================================================================
Missaka Wijekoon (a.k.a. Misk) (e-mail address removed)
Sr. Software Engineer http://www.villageEdocs.com
VillageEdocs
========================================================================
 

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
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top