title: how to check radio button gender variable in jstl using c:if
body: <p>try to build simple crud application in Netbeanse ide.</p>
  
  <p>In the edit record page how do i Display corresponding gender.</p>
  
  <p>if i was using <strong>scriptlet</strong> to write the code as follows in jsp page:</p>
  
  <pre><code> &lt;% if(rm.getGender().equals("Male")){ %&gt;
  
   &lt;input type="radio" name="Gender" tabindex="" value="Male" checked="checked"&gt; Male 
   &lt;input type="radio" name="Gender" tabindex="" value="Female"&gt;Female
  
     &lt;%}else{ %&gt;
            &lt;input type="radio" name="Gender" tabindex="" value="Male"&gt; Male 
           &lt;input type="radio" name="Gender" tabindex="" value="Female" checked="checked"&gt;Female
  
      &lt;% } %&gt;      
  </code></pre>
  
  <p><strong>Now my jstl code</strong> :</p>
  
  <pre><code>                        &lt;c:if test="${user.gender}"  var="Male"&gt;
                              &lt;input type="radio" name="gender" value="Male" checked="checked"/&gt;Male &lt;input type="radio" name="gender" value="Female" /&gt;Female     
                          &lt;/c:if&gt; 
    &lt;c:if test="${user.gender}" var="Female"&gt;
         &lt;input type="radio" name="gender" value="Male" checked="checked"/&gt;Male &lt;input        type="radio" name="gender" value="Female" checked="checked"/&gt;Female   
                           &lt;/c:if&gt; 
  </code></pre>
  
  <p>i did'nt get desired output. 
  any  suggesion plz.</p>
  
  <p>Thanks to <strong>Mr.Dhruv pal</strong> I got the Answer:</p>
  
  <pre><code>&lt;c:choose&gt;
     &lt;c:when test="${(user.gender).equalsIgnoreCase('Male')}"&gt;
                                &lt;td&gt;&lt;input type="radio" name="gender" value="Male"     checked="checked"/&gt;Male &lt;input type="radio" name="gender" value="Female" /&gt;Female &lt;/td&gt;    
     &lt;/c:when&gt;
     &lt;c:otherwise &gt;
                                     &lt;td&gt;&lt;input type="radio" name="gender" value="Male" checked="checked"/&gt;Male &lt;input type="radio" name="gender" value="Female" checked="checked"/&gt;Female &lt;/td&gt;         
     &lt;/c:otherwise&gt;
  &lt;/c:choose&gt;
  </code></pre>