translation scriptlet to jstl

How could i translate this code to jstl , EDepedencia is my bean and i want to get the name attribute by using getNom_dependencia();

<td>

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

<option selected></option>

<%

HttpSession sessionJsp = request.getSession(false);

if(sessionJsp==null){%>

<option>none</option>

<%}

else{

%>

<%

List records = (List) sessionJsp.getAttribute("dependencias");

for (int i=0;i<records.size();i++){

EDependencia a = (EDependencia) records.get(i);

%>

<option><%=a.getNom_dependencia()%></option>

<%

}

}

%>

</select>

</td>

[1299 byte] By [pompeighuIIa] at [2007-11-27 6:21:47]
# 1

<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>

-

-

-

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

<option>pick one</option>

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

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

</c:forEach>

</select>

--

--

--

--

or guess

<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>

-

-

-

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

<option>pick one</option>

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

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

</c:forEach>

</select>

--

--

--

--

might work too

Hope that might help :)

REGARDS,

RaHuL

RahulSharnaa at 2007-7-12 17:38:30 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
it's telling me that ${sessionScope["dependencias"} contains invalid expressions : javax.el.ELException Error parsing.......What's missing?
pompeighuIIa at 2007-7-12 17:38:30 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
ah !! that was typotry out with<c:forEach items="${sessionScope['dependencias']}" var="EDependencia">else where give it a try with the other solution.
RahulSharnaa at 2007-7-12 17:38:30 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
sorry i didn't see it. I tried it and It works fine, thank you very much. =D
pompeighuIIa at 2007-7-12 17:38:30 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5
sorry i didn't see it. I tried it and It works fine, thank you very much. =D
pompeighuIIa at 2007-7-12 17:38:30 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...