• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

getting the parameters from multipart/form-data

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My JSP:

My Servlet:


In the console you will see 'Title: null'
 
Sheriff
Posts: 67756
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The getParameter() family of methods will not work with anything other than data encoded as x-www-form-urlencoded.

if you are using a 3rd-party library to assist in the file upload, it will have methods to fetch the parameters. If you are parsing the multi-part request yourself (not recommended!), well, then you need to parse out the parameters yourself.
 
Jim Halpert
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using:
commons-fileupload-1.2.2.jar
&
commons-io-2.0.1.jar

Do you know which method to call so I can get the parameters? (I could not find anything in the API list)

 
Ranch Hand
Posts: 81
IBM DB2 Eclipse IDE Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
everything is explained very well in here:

http://commons.apache.org/fileupload/using.html
 
Jim Halpert
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

olivier dutranoit wrote:everything is explained very well in here:

http://commons.apache.org/fileupload/using.html



That helped me alot, I got it working!! Thanks a lot.
 
reply
    Bookmark Topic Watch Topic
  • New Topic