title: Get parameter when multipart request in JSP
body: <pre><code>&lt;%@page contentType="text/html" pageEncoding="UTF-8"%&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;
          &lt;title&gt;Add new product&lt;/title&gt;
              &lt;link type="text/css" rel="Stylesheet" href="css/SiteStyle.css" /&gt;
              &lt;script src="js/jquery-1.3.2.js" type="text/javascript"&gt;&lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
           &lt;form id="MainForm" action="Relay" method="post" enctype="multipart/form-data"&gt;
              &lt;input name="destination"  type="hidden" value="AddNewProduct" /&gt;
               &lt;script src="js/AddNewProduct.js" type="text/javascript"&gt;&lt;/script&gt;
              &lt;center&gt;
                  &lt;h1&gt;Add new product&lt;/h1&gt;
              &lt;hr /&gt;
          &lt;table class="TableLogin"&gt;
              &lt;tr&gt;
                  &lt;td align="center" colspan="2" class="TDLoginHeader"&gt;
                          Product information&lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td align="right" class="TDLoginTitle"&gt;
                          Product Title
                  &lt;/td&gt;
                  &lt;td align="left" class="TDLoginText"&gt;
                      &lt;input id="TxtTitle" type="text" class="LoginTextBoxes" name="Title" maxlength="75" /&gt;&lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td align="right" class="TDLoginTitle"&gt;
                          Dollar price
                  &lt;/td&gt;
                  &lt;td align="left" class="TDLoginText"&gt;
                      &lt;input id="TxtPrice" type="text"  class="LoginTextBoxes" name="Price" maxlength="15" /&gt;&lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td align="center" colspan="2" class="TDLoginTitle"&gt;
                      Product number&lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td align="center" colspan="2"&gt;
                      &lt;table style="width:100%;"&gt;
              &lt;tr&gt;
                  &lt;td align='center' class='TDProductNumber'&gt;
                      &lt;input id='Txtdigit1' name='Txtdigit1' class='TxtProductNumber' type='text' /&gt;
                 &lt;/td&gt;
                  &lt;td align='center' class='TDProductNumber'&gt;
                      &lt;input id='Txtdigit2' name='Txtdigit2' class='TxtProductNumber' type='text' /&gt;
                  &lt;/td&gt;
                  &lt;td align='center' class='TDProductNumber'&gt;
                      &lt;input id='Txtdigit3' name='Txtdigit3' class='TxtProductNumber' type='text' /&gt;
                  &lt;/td&gt;
                  &lt;td align='center' class='TDProductNumber'&gt;
                      &lt;input id='Txtdigit4' name='Txtdigit4' class='TxtProductNumber' type='text' /&gt;
                  &lt;/td&gt;
                  &lt;td align='center' class='TDProductNumber'&gt;
                      &lt;input id='Txtdigit5' name='Txtdigit5' class='TxtProductNumber' type='text' /&gt;
                  &lt;/td&gt;
                  &lt;td align='center' class='TDProductNumber'&gt;
                      &lt;input id='Txtdigi6' name='Txtdigit6' class='TxtProductNumber' type='text' /&gt;
                  &lt;/td&gt;
                  &lt;td align='center' class='TDProductNumber'&gt;
                      &lt;input id='Txtdigit7' name='Txtdigit7' class='TxtProductNumber' type='text' /&gt;
                  &lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td colspan="7" class="TDLoginTitle"&gt;
                      &lt;label&gt;Product Image&lt;/label&gt;
                          &lt;input id="ProductImage" name="ProductImage" type="file" /&gt;
                  &lt;/td&gt;
              &lt;/tr&gt;
            &lt;/table&gt;
                  &lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td align="center" colspan="2"&gt;
                        &lt;input id="BtnAdd" type="button" value="Add" class="BtnSize" /&gt;&lt;/td&gt;
              &lt;/tr&gt;
          &lt;/table&gt;
          &lt;div id="DivAddMessage"&gt;
          &lt;/div&gt;
          &lt;div&gt;
             &lt;a href='Login.jsp'&gt;Back&lt;/a&gt;
          &lt;/div&gt;
          &lt;/center&gt;
          &lt;/form&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Servlet 'Relay' code:</p>
  
  <pre><code>protected void processRequest(HttpServletRequest request, HttpServletResponse response)
  throws ServletException, IOException {
      response.setContentType("text/html;charset=UTF-8");
      PrintWriter out = response.getWriter();            
      String destination=request.getParameter("destination");
      out.print(destination);
  }
  </code></pre>
  
  <p>this is a piece of code for enter product inforamtion (title , price , 7 digit number, product image) , when i want to get 'destination' parameter in servlet the value got is null i know that because multipart request , but how i can get this value and the file uploaded value ?</p>