• Post Reply Bookmark Topic Watch Topic
  • New Topic

File upload using JSP/Servlet  RSS feed

 
Abhijit Das
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

I know the question was posted number of times. I have seen some of the answers.

Now, I want to know is it possible to use the 'request' object in JSP/Servlet to get the form values(HTML controls) where the
request.getContentType() gives multipart/form-data (i.e enctype="multipart/form-data" used in form attrbute).

I have to handle the uploaded file and the all the request values in a same JSP/Servlet.

Getting the values of the HTML controls in the 'DataInputStream' is tedious work .

Thanks


 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66260
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. That is why most people use one of the freely available libraries that take care of all this for you.
 
Abhijit Das
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bear Bibeault ,

Are you talking about the Apache library.?
commons-fileupload-1.2.jar

 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See http://faq.javaranch.com/java/FileUpload for more information.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!