J
jgmaux
Hi,
I have a problem with JSTL EL (Expression Language) in JSP.
The follow example show my problem.:
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<body>
<%
java.util.HashMap clients = new java.util.HashMap();
clients.put("1","John");
clients.put("2","Peter");
clients.put("3","Gerald");
clients.put("4","Nick");
request.setAttribute("clients",clients);
%>
<c:forEach var='clientnum' begin='1' end='4'>
<br>
Client Nº::${clientnum}
</br>
<br>
Value:${requestScope.clients["${clientnum}"]}
</br>
</c:forEach>
</body>
</html>
My code don't display the "clients" values...
¿Where is the problem?
I don't want to use iteration, please....
Thanks in advance.
I have a problem with JSTL EL (Expression Language) in JSP.
The follow example show my problem.:
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<body>
<%
java.util.HashMap clients = new java.util.HashMap();
clients.put("1","John");
clients.put("2","Peter");
clients.put("3","Gerald");
clients.put("4","Nick");
request.setAttribute("clients",clients);
%>
<c:forEach var='clientnum' begin='1' end='4'>
<br>
Client Nº::${clientnum}
</br>
<br>
Value:${requestScope.clients["${clientnum}"]}
</br>
</c:forEach>
</body>
</html>
My code don't display the "clients" values...
¿Where is the problem?
I don't want to use iteration, please....
Thanks in advance.