title: Retrieving the value of select option in Servlets
body: <p>I have a select tag in my form which is to be send to Servlet. I have made the contents of the select tag dynamic(it gets values from a table column in DB). </p>
  
  <pre><code>Select Branch:-&lt;select&gt;  
              &lt;%  
              while(r.next()){  
      %&gt;  
             &lt;option&gt;&lt;%=r.getString("code")%&gt;&lt;/option&gt;  
              &lt;%  
             }  
  r.close();  
  s.close();  
  con.close();  
      %&gt;  
          &lt;/select&gt; 
  </code></pre>
  
  <p>('r' is ResultSet) 
  My problem is how can i send the value the user has selected from select tag to servlet. For using Request.getparameter("name") I must know the value of option tag. 
  I my confused.Please help.. 
  Thanks.</p>