title: How to set default value for drop-down/select in JSP?
body: <p>I have an arraylist for Strings <em>eqArray</em>.</p>
  
  <p>I need to show it in a drop-down list for which I'm using the following in my JSP:</p>
  
  <p></p>
  
  <pre><code>&lt;% 
  
      for(int count=0;count&lt;eqArray.size();count++){ %&gt;
              &lt;option value="&lt;%=eqArray.get(count)%&gt;"&gt;&lt;%=eqArray.get(count)%&gt;&lt;/option&gt;  
       &lt;%} 
  %&gt;
  </code></pre>
  
  <p></p>
  
  <p>I have an eqName String which is part of eqArray and should be the selected value by default.</p>
  
  <p>How do I go about it without having to check and set the first option as eqName always?</p>