title: Usage of enctype multipart/form-data in multi data type form
body: <p>I have html page which contains 3 file input and 3 text inputs. If I use enctype = multipart/form-data in jsp page I am not able to get the test input form fields. These values always show null. If I remove enctype from post form in jsp, I can get the text field inputs but in this case I cannot upload files. So my question is is it possible to have multiple input fields with file input and if yes how to get the text input field names??</p>
  
  <p>Any help on this is appreciated..</p>
  
  <p>Below is the html code</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  &lt;form method="post" action="upload.jsp" enctype="multipart/form-data"&gt;
    Office Name: &lt;input type="text" name="officeName" /&gt;  &lt;br&gt;
    Doc. Description : &lt;input type="text" name="docDesc" /&gt;   &lt;br&gt;
    Document 1 :  &lt;input type="file" name="doc1" /&gt;   &lt;br&gt;
    Document 2 :  &lt;input type="file" name="doc2" /&gt;   &lt;br&gt;
    Document 3 :  &lt;input type="file" name="doc3" /&gt;   &lt;br&gt;
    Remarks : &lt;input type="text" name="remarks" /&gt;    &lt;br&gt;
  
    &lt;br&gt;
      &lt;input type="submit" value="submit" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>
  </p>
  
  <p>And i am retrieving text and file inputs as</p>
  
  <pre><code>strOffficeName=Request.getParameter("officeName");
  strDocDescription=Request.getParameter("docDesc");
  strDoc1Path=Request.getParameter("doc1");
  strDoc2Path=Request.getParameter("doc2");
  strDoc3Path=Request.getParameter("doc3");
  strRemarks=Request.getParameter("remarks");
  </code></pre>