title: How to display checked radio button based on previous value?
body: <p>I have a form which gets user information and saves it into database. My form consists of text fields and radio buttons.
  (I am using jsp, bean  servlet, jdbc)</p>
  
  <p>Now i have made another form which is to edit the user entered information, it also shows their previous entered information in the text fields. </p>
  
  <p>I can display the previous entered information in the text fields but my problem is that I cannot show the previous checked radio buttons, how can i do that?</p>
  
  <p>Below is an example of text field showing previous entered value </p>
  
  <pre><code>&lt;tr&gt;
      &lt;td&gt;Email:&lt;/td&gt;
      &lt;td&gt;&lt;input type="text" name="editregisterEmail" maxlength="10" size="15" value="&lt;jsp:getProperty name="StudentBean" property="email"/&gt;"&gt;&lt;/td&gt;
  &lt;/tr&gt;        
  </code></pre>
  
  <p>The problem is here, how can I show users the previous checked radio button for them to recheck?</p>
  
  <p>I have the following code which gets previous radio button value which was checked by user</p>
  
  <pre><code>&lt;jsp:getProperty name="StudentBean" property="department"/&gt;
  </code></pre>
  
  <p>Below is the problem</p>
  
  <pre><code>&lt;tr&gt;
      &lt;td&gt;Department: &lt;/td&gt;
      &lt;td&gt;
          &lt;input type="radio" name="editregisterDepartment" value="Information Technology"&gt; Information Technology  
          &lt;input type="radio" name="editregisterDepartment" value="Business Administration"&gt; Business Administration
          &lt;input type="radio" name="editregisterDepartment" value="Engineering"&gt; Engineering
      &lt;/td&gt;
  &lt;/tr&gt;   
  </code></pre>