aspose 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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
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: 61756
    
  67

Search for the term "upload" in this forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: copying file from client system to and storing in server