title: How to send id from dropdown populated student name in jsp?
body: <p>I am fetching <strong>studentName</strong> and <strong>studentId</strong> from database and populated name in database. now how to send <strong>studentId</strong> from jsp to servlet after selecting particular <strong>studentName</strong> from dropdown.
  here is my code:</p>
  
  <pre><code>&lt;Select name="studentDetails" id="std"&gt;  
      &lt;c:forEach items="${stdList}" var="std"&gt;  
          &lt;option value="1"&gt;&lt;c:out value="${std.name}"/&gt;&lt;/option&gt;  
       &lt;/c:forEach&gt;  
  &lt;/select&gt; 
  </code></pre>