title: How to produce valid HTML with JSPX? (not XHTML)
body: <p>When trying to create a HTML page with JSPX you will face the following difficulties:</p>
  
  <ul>
  <li>JSPX minimizes tags we don't want it to, for example <code>&lt;div class="foo"&gt;&lt;/div&gt;</code> becomes <code>&lt;div class="foo"/&gt;</code> which is interpreted differently by browsers</li>
  <li>JSPX tags must be closed, while some HTML tags should remain unclosed, for example <code>&lt;script...&gt;</code>. Self-closed <code>&lt;script.../&gt;</code> tag is not recognized by IE and Firefox.</li>
  <li>Specifying HTML5 doctype (<code>&lt;!DOCTYPE html&gt;</code>)</li>
  <li>Inline JavaScript</li>
  </ul>
  
  <p>This question is a response to a few other that all boil down to the same problem. I couldn't find a comprehensive answer so I'm posting the result of my findings.</p>
  
  <p>Related questions:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/2058649/jspx-script-element-on-glassfish-v3">jspx script element on GlassFish v3</a></li>
  <li><a href="https://stackoverflow.com/questions/3907744/keep-jspx-from-creating-self-closing-tags-div-div-div">Keep JSPX from creating self closing tags (&lt;div&gt;&lt;/div&gt; != &lt;div/&gt;)</a></li>
  </ul>