09/06/18 20:55:20 vPh/0hNl
JSPのEL式で、入れ子構造を使うことってできないのでしょうか?
例えば以下のように、Mapから値を得るときのキーを、EL式で指定したいのですが……。
<%
Map<String, String> map = new Hashmap<String, String>();
map.put("tashiro", "masashi");
map.put("nishimura", "hiroyuki");
request.setAttribute("map", map);
request.setAttribute("key", "tashiro");
%>
<c:out value="${map["${key}"]}"/>
<c:out value="${map."${key}"}"/>