title: Value of radio button is as NULL and ON
body: <p>I'm trying to retrieve the value of a radio button in a servlet but im getting ON for the ones i have selected and Null for the ones i have not selected. I'm not getting the values. Please do help me out.</p>
  
  <p>The Servlet </p>
  
  <pre><code>for(int i=0;i&lt;itemnode.getLength();i++){
              ans[i] = request.getParameter(Integer.toString(i));
              System.out.println(ans[i]);
          }
  </code></pre>
  
  <p>The html page : </p>
  
  <pre><code>&lt;input type="radio" name="1" value="1" style="float: left;"&gt;
  &lt;input type="radio" name="1" value="2" style="float: left;"&gt;
  &lt;input type="radio" name="1" value="3" style="float: left;"&gt;
  &lt;input type="radio" name="1" value="4" style="float: left;"&gt;
  
  &lt;input type="radio" name="2" value="1" style="float: left;"&gt;
  &lt;input type="radio" name="2" value="2" style="float: left;"&gt;
  &lt;input type="radio" name="2" value="3" style="float: left;"&gt;
  &lt;input type="radio" name="2" value="4" style="float: left;"&gt;
  </code></pre>
  
  <p>The output at console: </p>
  
  <pre><code>null
  on
  </code></pre>
  
  <p>Null for the ones i have not selected and On for the ones i have selected</p>