wood burning stoves 2.0*
The moose likes Servlets and the fly likes multipart/form-data with controller Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "multipart/form-data with controller" Watch "multipart/form-data with controller" New topic

multipart/form-data with controller

Angel Garcia

Joined: May 07, 2012
Posts: 1

I'm trying to develop a small application in which a multipart form sends the request to a controller and it redirects to the servlet that processes it. For that I use a hidden field with the id form in which I set which servlet use.
If I use Tomcat 7 I have no problems. The trouble is that I have to use Tomcat 6 and here I fail to make it work.
I tested with 2 libraries. Apache fileupload and other downloaded from O'Reilly, both in the controller I can get the parameter form and find out which servlet redirect, but I can not process the form in the servlet again, it is as if the controller removed the parameters.

The code with OReilly library:

Apache Fileupload:

To redirect:

Can someone help me?

Thanks and best regards.
It is sorta covered in the JavaRanch Style Guide.
subject: multipart/form-data with controller
Similar Threads
upload works well in a .html file but when I call it from a .xhtml file it shows an error
How to display all headers of multipart request?
Submit multipart and form data
java doesn´t error uploading files because jar version
request.getParameter() returns null