jstl drop down B depends on drop down A

How do i do to populate a second Drop down which depends on the value i selected from a previous drop down list?

So far the way i populate a single drop down list is like this.. Before loading the page i put in my httpSession a List with the data i will populate.. and when i select i put the value of that option into a hidden input Text Field..

<select class="combo" name="selectDependencias"onChange="this.form.inputDependencia.value = this.value;">

<option selected></option>

<c:forEach items='${sessionScope.dependencias}' var='EDependencia'>

<option value="<c:out value='${EDependencia.cod_dependencia}'/>">

<c:out value='${EDependencia.nom_dependencia}'/>

</option>

</c:forEach>

</select>

[1006 byte] By [pompeighuIIa] at [2007-11-27 10:05:31]
# 1

AFAIK you can't run jstl once the page finishes loading, so if these dropdown choices are user-driven (user A selects something from dropdown 1 and then you want dropdown 2 to change) then you have to

1) use javascript (possibly with some AJAX) once a choice is made in dropdown1

2) refresh the entire page once a choice is made in dropdown 1

den2681a at 2007-7-13 0:40:34 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...