title: How to use drop down list's value from a HTML page into a servlet?
body: <p>I'm trying to create a simple calculator using servlets and HTML. For 1 operation it works, but how do I use a structure like</p>
  
  <pre><code>if (+) {
      k=i+j;
  } else if (-) {
      k=i-j;
  }
  </code></pre>
  
  <p>I mean to say, what should I write in the <code>if</code> condition to get the drop down list's value?</p>
  
  <p>My drop down list is like below:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;select name="select1"&gt;
      &lt;option value="+"&gt;+&lt;/option&gt;
      &lt;option value="-"&gt;-&lt;/option&gt;
      &lt;option value="*"&gt;*&lt;/option&gt;
      &lt;option value="/"&gt;/&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>I'm using Tomcat 6 on Windows.</p>