• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

file uploading

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Sony.
 
Author
Posts: 399
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

this API
-sonny


this link is not working...!!!
malhar
 
Ranch Hand
Posts: 184
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!!
 
So it takes a day for light to pass through this glass? So this was yesterday's tiny ad?
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic