I am developing one sample web application in JSP. In this application i want to call the servlet method after some action triggered, For example the list of department is displayed in the drop down list, after selecting the department i want to retrieve the list of students name from the database. Am new to jsp any one help me to achieve this, Thanks in advance.
<form method="post" action="index.jsp" name="form1" onsubmit="return checkme()">
<table cellpadding="2">
<tr>
<td>
<p style="color: blue;font-family: sans-serif;">Select Project:</p>
</td>
<td>
<select id="project" onchange="">
<option value="0">Select..</option>
<c:forEach items="<%=department%>" var="entry">
<option value="${entry.key}">${entry.value}</option>
</c:forEach>
</select>
</td>
</tr>
<tr>
<td>
<p style="color: blue;font-family: sans-serif;">Select Employee:</p>
</td>
<td>
<select id="employee">
<option value="0">Select..</option>
<c:forEach items="<%=emplist%>" var="entry1">
<option value="${entry1.key}">${entry1.value}</option>
</c:forEach>
</select>
</td>
</tr>
</table>
<input type="submit" value="Submit">
</form>