This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Servlets and the fly likes File upload Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "File upload" Watch "File upload" New topic
Author

File upload

Rashmee H S
Greenhorn

Joined: May 29, 2008
Posts: 6
Hi

I need to read .doc, pdf, gif and .jpg files from one location and upload to some other location in my system or some other system in the .

Can someone give me the sample java code how to do it.

Thanks in advance
Rashmee
[ June 13, 2008: Message edited by: Rashmee H S ]
Prakash Subramanian
Ranch Hand

Joined: Feb 03, 2005
Posts: 32
Hello, your question is very general in nature. Uploading to some other location in your system would mean copying that file to the other location. The File I/O API's in Java would be the place you want to look for that. For uploading to some other system in the network, the ways are many. It depends on the protocols you want to use, could be FTP, HTTP, SMB etc. Quite a few JDK and third party libraries are available for this.

Try referring the JDK API's, Apache Commons (File-Upload for you), JCIFS etc. You can google for these terms and get the right hit. Also try the simpler case of copying to another location on your system first.

But since you posted it in this forum, try referring to http://commons.apache.org/fileupload/
[ June 11, 2008: Message edited by: Prakash Subramanian ]
Shashi Ranjan
Greenhorn

Joined: Jun 12, 2007
Posts: 8
You can also use FileUploadBean for non commercial use. Just search for the UploadBean in the google and you will get the material.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: File upload
 
Similar Threads
Passed OCJP6 with 96%
uploading
doubt regarding Directory Upload using HTTPclient3.1 library
Uploadin file in remote system
JavaMail