my dog learned polymorphism*
The moose likes Servlets and the fly likes multipart form & req.getParameter problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "multipart form & req.getParameter problem" Watch "multipart form & req.getParameter problem" New topic
Author

multipart form & req.getParameter problem

DC Dalton
Ranch Hand

Joined: May 28, 2001
Posts: 287
I am building a multipart form for a user to upload pics to his site (too dumb to use ftp) and Ive hit a snag that I dont quite get. I have 2 hidden fields that hold the product number and a task variable that I use in the main controller's switch statement. Im not getting these 2 fields using a javax.servlet.http.HttpServletRequest - .getParameter("field_name"). Im using the Oreilly servlet package for the image uploads but the main controller uses this task variable extensively & playing games trying to figure out if they are uploading or one of the other 20 things seems like a real pain in the you-know-what. Does the javax.servlet.http.HttpServletRequest not recognize info from a multipart form?

I swear Ive done this before but cant seem to find the code! Any & all "kicks in the brain" would be much appreciated ... I know Im missing somethign stupid here & I am working on 2 hours sleep so Im probably just brain-dead! Thanks
[ September 02, 2004: Message edited by: DC Dalton ]
Rovas Kram
Ranch Hand

Joined: Aug 08, 2003
Posts: 135
You use ParamPart similarly to the way you use FilePart. Both of which are results of the mutlitpart parser.
 
jQuery in Action, 2nd edition
 
subject: multipart form & req.getParameter problem