This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

file uploading

 
reddy palwai
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
I have a question about file uploading in servlets.
I have an html form with an input file type as FILE and enctype as multipart/form-data.
<FORM ENCTYPE="multipart/form-data" ACTION="blobinsert" METHOD=POST>
<INPUT TYPE=FILE NAME="uploadfile">
In my servlet I need to get the parameters from the html form.
For text and other input types we can get the parameters using getParameter(). But how can I get the data from when file is uploaded?
Please Help!! this is kind of Urgent.
Thanks in advance.
reddy
 
sonny kher
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you are better of using a custom API for this. I did a similar application recently and to get binary data I used
this API
Check it out its pretty simple and cuts down on a lot of work you'd have to do otherwise.
-sonny
 
reddy palwai
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Sony.
 
Malhar Barai
Author
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this API
-sonny

this link is not working...!!!
malhar
 
daman sidhu
Ranch Hand
Posts: 184
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try using oriellys classes for the same, very good for multipart file transfers.. i guess they can be downloaded from their website.. tho i got them from the CD along with the servlets book..
Cheers!!
Daman
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by malhar barai:

this link is not working...!!!
malhar

Check this
jsp smart upload
 
reddy palwai
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have used orielly's classes for multipart file transfers. I downloaded the package from their web site. It worked!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic