When I submit this form, the FooServlet receives an HttpServletRequest with a Content Type value of multipart/form-data The problem is that the "submitter" attribute and the "serviceClass" attribute are not set. The servlet has no way to read the serviceClass value.
Perhaps the web browser does not send the serviceClass parameter in the HTTP request? Any advice? The client web browser is Internet Explorer 6.0 SP1 <FORM ACTION="/servlet/FooServlet" ENCTYPE="multipart/form-data" METHOD=POST> What is your name? <INPUT TYPE=TEXT NAME=submitter><br> What file are you sending? <INPUT TYPE=FILE NAME=secretDocument><br> <input type=hidden name="serviceClass" value="FoobarServiceMgr"> <input type="submit" value=Submit><br> </FORM>
The problem is that when the browser is sending the data, it is encoding it in a way that the server can't understand. To decode multipart/form-data encoded data, see the cos package available here There are other packages available (and no doubt others will come forward and point them out), but the O'Reilly ones seem quite stable and popular Dave