title: Struts html html:text does not close input type="text" tags
body: <p>I use struts-html to generate forms fields. </p>
  
  <p>For example: </p>
  
  <pre><code>&lt;%@ taglib prefix="html" uri="/WEB-INF/taglibs/struts-html.tld" %&gt;
  
  &lt;html:text property="email" styleId="email" size="44"/&gt;
  </code></pre>
  
  <p>generates:</p>
  
  <pre><code>&lt;input type="text" name="email" size="44" value="" id="email"&gt; 
  </code></pre>
  
  <p>As shown above the generated input tag is not closed. This causes my html to be not valid. </p>
  
  <p>struts-html.tld includes: </p>
  
  <pre><code>&lt;tlibversion&gt;1.2&lt;/tlibversion&gt;
  &lt;jspversion&gt;1.1&lt;/jspversion&gt;
  &lt;shortname&gt;html&lt;/shortname&gt;
  &lt;uri&gt;http://struts.apache.org/tags-html&lt;/uri&gt;
  </code></pre>
  
  <p>Does anyone knows why is the generated input not closed? Is there a newer version? Where can it be downloaded?</p>
  
  <p>I tried using:</p>
  
  <pre><code>&lt;html:html xhtml="true"&gt;
  </code></pre>
  
  <p>which renders as: </p>
  
  <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US"&gt; 
  </code></pre>
  
  <p>However, my input tags keep rendering unclosed. </p>
  
  <hr>
  
  <p>Solution: </p>
  
  <p>Use the tag: </p>
  
  <pre><code>&lt;html:xhtml/&gt;
  </code></pre>
  
  <p><strong>Note:</strong> If you use Tiles, as I do, use it directly inside your included jsp. It is not inherited from your base template file. </p>
  
  <p><strong>Note:</strong> Within xhtml mode you can not use sytleId inside a html:form tag. It is not a problem since the id property is automatically generated to store your bean's name.</p>