title: Java (JSP): repeating the contentType header in a "sub-jsp"
body: <p>What happens when headers are repeated in a .jsp you include in another .jsp?</p>
  
  <p>For example if <em>example.jsp</em> starts with this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;jsp:root version="2.0" xmlns:jsp="http://java.sun.com/JSP/Page"&gt;
  &lt;jsp:directive.page contentType="text/html; charset=UTF-8" /&gt;
  
  &lt;div class="content"&gt;
  
  &lt;jsp:include page="support.jsp"/&gt;
  ...
  </code></pre>
  
  <p>(it includes <em>support.jsp</em>)</p>
  
  <p>And then <em>support.jsp</em> starts <strong>also</strong> with this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;jsp:root version="2.0" xmlns:jsp="http://java.sun.com/JSP/Page"&gt;
  &lt;jsp:directive.page contentType="text/html; charset=UTF-8" /&gt;
  ... 
  </code></pre>
  
  <p>Is that a problem? Is it bad practice?</p>
  
  <p>What does <em>concretely</em> happen when you repeat several times a header that only corresponds to one header in the resulting .html page?</p>