File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes copying file from client system to and storing in server Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "copying file from client system to and storing in server" Watch "copying file from client system to and storing in server" New topic
Author

copying file from client system to and storing in server

srinivas srini
Greenhorn

Joined: Feb 03, 2004
Posts: 23
hi all
please let me know how can we read a file(any file) which is at client location, from client system i should read the file and write it to the file at the server side with the same file name as that of at client system..
if any of you could paste a small code in this regard i will be very much thankful
should we make use of IP address for reading a file from client location?
im using apache tomcat 4.1
matt hooker
Ranch Hand

Joined: Jul 26, 2001
Posts: 46
So srinivas, to get this straight. You want your java servlet to have access to read the contents of a client file system and copy a file to the server. You would need the client to 'request' this action (such as using an html 'file' component and allowing them to 'post' this file to the server. Java's security requirements (in fact - just general security) mean that letting a server access a clients FS 'at will' is a total NO NO !!!


Its not what you do, its the way you say you've done it.
srinivas srini
Greenhorn

Joined: Feb 03, 2004
Posts: 23
we allow the client to select a file using a html file and once the file is selected the file has to be stored in the server.....
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56157
    
  13

Search for the term "upload" in this forum.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: copying file from client system to and storing in server
 
Similar Threads
upload and download file to any machine in a n/w
How to store the PDF file in the server side?
Prompt for location when file is downloading
must be persistent between runs of the program?
JWS: Executable jar runs but doesn't show the data