My jsp page
<select name="se">
<option value="1">D1</option>
<option value="2">D2</option>
<option value="3">D3</option>
</select>
While the user selects D1,then in the same page i want to display the contents from the database.
I want the same for D2,D3.
Where should i write the select query?
You can use
onchangeevent to make an call to server. On server side you can handle the request and return the required result from database and show it or alternatively you can pre-fetch result from database while calling jsp and just can show/hideonchangeevent.like using jQuery