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 File Upload from form 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 "File Upload from form " Watch "File Upload from form " New topic
Author

File Upload from form

Seema Das
Ranch Hand

Joined: Mar 05, 2001
Posts: 78
Hi,
I know how to browse files in html form.( with input type = file.)
but how do I upload this file on to a server where my servlet can access/read/save it.
any ideas?
Thanks
Vlad Patryshev
Ranch Hand

Joined: Jun 30, 2001
Posts: 61
<input type="file">


Thanks,<br />Vlad
sanket more
Greenhorn

Joined: Jul 26, 2001
Posts: 6
hi Seema,
What u can do is u can use the MultipartRequest class which oreilly gives u. Just go to the site www.oreilly.com, get the cos.jar file, include it in ur classpath and then access the MultipartRequest class to upload the files.
Another way is to use the FileInputStream, the first one is better.
Sanket.
Originally posted by Seema Das:
Hi,
I know how to browse files in html form.( with input type = file.)
but how do I upload this file on to a server where my servlet can access/read/save it.
any ideas?
Thanks

Seema Das
Ranch Hand

Joined: Mar 05, 2001
Posts: 78
Thanks Sanket! I will try it out!
Seema Das
Ranch Hand

Joined: Mar 05, 2001
Posts: 78
Hi Guys,
I am not able to find any classes on oreilly.com. As Sanket has suggested, I am trying to get the cos.jar for file upload. Could someone give me the exact URL for it?
Thanks
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040

the website is http://www.oreilly.com/
without the comma.....
- satya

Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
Seema Das
Ranch Hand

Joined: Mar 05, 2001
Posts: 78
well, I am sorry if I am not clear enough. I found the site, I then went to onjava.com, did search for cos.jar as well as for MultiPartRequest class but didn't find the class or jar file which I want to download.
So I want to know the exact url where I can find the class for file upload.
Thanks
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

easier to find it here: http://www.servlets.com/cos/index.html
Seema Das
Ranch Hand

Joined: Mar 05, 2001
Posts: 78
Thanks!
sanket more
Greenhorn

Joined: Jul 26, 2001
Posts: 6
hi Seema,
Did u manage to solve the probs?...
chau
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: File Upload from form