title: struts 1.3 - <html:radio> preselect
body: <p>I have been making an application using struts 1.3 and stuck in a very trivial problem. Within the login form, there are two radio buttons to chose from, for login as "test" and "admin". The code is as follows</p>
  
  <pre class="lang-html prettyprint-override"><code>...          
  &lt;div class="radioLabel" &gt;Test &lt;/div&gt; 
  &lt;div class="radioButton" &gt;&lt;html:radio property="usertype" value="test" &gt;&lt;/html:radio&gt;&lt;/div&gt;
  
  &lt;div class="radioLabel" &gt;&amp;nbsp;&amp;nbsp;Admin&lt;/div&gt; 
  &lt;div class="radioButton" &gt;&lt;html:radio property="usertype" value="admin" &gt;&lt;/html:radio&gt;&lt;/div&gt;
  ...          
  </code></pre>
  
  <p>While going through some posts, I found that setting the "initial" attribute of form-property tag which corresponds to the radio button would work. But it didn't work in my case.</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;form-bean name="LoginForm" type="company.project.model.LoginForm"&gt;
      ...  
      &lt;form-property name="usertype" type="java.lang.String" initial="test" &gt;&lt;/form-property&gt;
  &lt;/form-bean&gt;
  </code></pre>
  
  <p>How is this caused and how can I solve it?</p>