title: Empty parameters list in requests from .html post multipart/form-data forms to servlets 2.5 or 3.0
body: <p>My problem is I have a form in an .html page which activates a servlet named CodeSubmission.
  At first I implemented using the 3.0 API (by just using <code>@WebServlet("/CodeSubmission")</code>), but whenever the servlet was activated the request came without any parameters.
  So I decided to give it a try and use the 2.5 API in a brand new project (by manually adding the servlet to the web.xml file), but again, whenever the servlet is called the request came without any parameters.</p>
  
  <p>I also thought it was because of file uploading field, but even after removing it the select field doesn't appear as a request parameter too.</p>
  
  <p>Here is the html form code:</p>
  
  <pre><code>&lt;form action="CodeSubmission" method="POST" enctype="multipart/form-data"&gt;
  &lt;label for="compiler"&gt;Compilador:&lt;/label&gt;
  &lt;select id="compiler"&gt;
      &lt;option value="c"&gt;C&lt;/option&gt;
      &lt;option value="c++"&gt;C++&lt;/option&gt;
      &lt;option value="scala7"&gt;Scala 2.7.7&lt;/option&gt;
      &lt;option value="scala8"&gt;Scala 2.8.1&lt;/option&gt;
      &lt;option value="java5"&gt;Java 1.5&lt;/option&gt;
      &lt;option value="java6"&gt;Java 1.6&lt;/option&gt;
  &lt;/select&gt;
  &lt;br /&gt; 
  &lt;label for="code"&gt;Arquivo:&lt;/label&gt;
  &lt;input id="code" type="file" size=80 /&gt;
  &lt;br /&gt; 
  &lt;input type="submit" value="Enviar" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>And here is the test code to check the parameters:</p>
  
  <pre><code>    System.out.println("Length: "+request.getContentLength());
      System.out.println("Content Type: "+request.getContentType());
      System.out.println("Method: "+request.getMethod());
      Enumeration&lt;String&gt; attributeNames = request.getAttributeNames();
      System.out.println("Request Attributes");
      while (attributeNames.hasMoreElements()) {
          String name = attributeNames.nextElement();
          System.out.println(name + ": " + request.getAttribute(name));
      }
      Enumeration&lt;String&gt; paramNames = request.getParameterNames();
      System.out.println("Request Parameters");
      while (paramNames.hasMoreElements()) {
          String name = paramNames.nextElement();
          System.out.println(name + ": " + request.getParameter(name));
      }
  </code></pre>
  
  <p>The request.getParameterNames() Enumeration has always size 0.
  Here is what is printed in the console when I click the 'Enviar' button after loading a file and selecting an option, using Servlet 2.5:</p>
  
  <pre><code>Length: 44
  Content Type: multipart/form-data; boundary=----WebKitFormBoundary4E3NYbsqXZZMWwcl
  Method: POST
  Request Attributes
  Request Parameters
  </code></pre>