title: ui:composition hides h:form parameter enctype
body: <p>I have a problem with <code>ui:composition</code> and <code>h:form</code> parameter <code>enctype="multipart/form-data"</code>.</p>
  
  <p>When <code>h:form</code> is nested in <code>ui:compostion</code>, <code>h:inputFile</code> throws:</p>
  
  <pre><code>javax.servlet.ServletException: The request content-type is not a multipart/form-data
  </code></pre>
  
  <p>When I place <code>h:inputFile</code> on JSF page without <code>ui:composition</code> it works fine.</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='UTF-8' ?&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://xmlns.jcp.org/jsf/html"
    xmlns:ui="http://xmlns.jcp.org/jsf/facelets"&gt;
  &lt;h:head&gt;
      &lt;title&gt;Power Consumption&lt;/title&gt;
  &lt;/h:head&gt;
  &lt;h:body&gt;
      &lt;ui:composition template="./resources/templates/dashboardTemplate.xhtml"&gt;
          &lt;ui:define name="content"&gt;
              &lt;h:form id="pcForm" enctype="multipart/form-data"&gt;
                  &lt;h2&gt;
                      Power Consumption
                  &lt;/h2&gt;
                  &lt;br/&gt;
                  &lt;h:outputLabel value="Upload CSV"/&gt;
                  &lt;h:inputFile id="file" value="#{powerConsumption.file}"/&gt;
                  &lt;h:commandButton value="Upload" action="#{powerConsumption.upload()}"/&gt;
                  &lt;br/&gt;
                  &lt;h:inputTextarea value="#{powerConsumption.fileContent}" rows="30" cols="80"/&gt;
              &lt;/h:form&gt;
          &lt;/ui:define&gt;
      &lt;/ui:composition&gt;
  &lt;/h:body&gt;
  </code></pre>
  
  <p></p>
  
  <p>dashboardTemplate.xhtml</p>
  
  <pre><code>&lt;h:body&gt;
  
      &lt;div id="top"&gt;
          &lt;ui:insert name="top"&gt;Welcome to Information Resource Manager 2&lt;/ui:insert&gt;
      &lt;/div&gt;
  
      &lt;div id="content" class="center_content"&gt;
          &lt;ui:insert name="content"&gt;Content&lt;/ui:insert&gt;
      &lt;/div&gt;
  
      &lt;div id="bottom"&gt;
          &lt;ui:insert name="bottom"&gt;Powered by Java&lt;/ui:insert&gt;
      &lt;/div&gt;
  
  &lt;/h:body&gt;
  </code></pre>