Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

File Upload from form

 
Seema Das
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<input type="file">
 
sanket more
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Sanket! I will try it out!
 
Seema Das
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

the website is http://www.oreilly.com/
without the comma.....
- satya
 
Seema Das
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
easier to find it here: http://www.servlets.com/cos/index.html
 
Seema Das
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks!
 
sanket more
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Seema,
Did u manage to solve the probs?...
chau
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic