ここのスレッドから、私のセットアップは次のとおりです。
設定:
- アパッチ トムキャット 5.5
- サーブレット/JSP: http://tomcat.apache.org/whichversion.htmlによると 2.4/2.0
- .WAR の JSTL:
1.2が 1.1.2 に変更されました。
私のweb.xmlには次のようなものがあります:
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
そして私の.JSPで
<% Set<ProductInfo> productInfoSet = (Set<ProductInfo>)session.getAttribute("productInfoSet");%>
<c:forEach items="${productInfoSet}" var="productInfo">
<c:out value="aa"/>
</c:forEach>
Set
デバッグでは、に 3 つの要素が含まれていることがわかりますが、文字列aa
は 1 回しか出力されません。どうして?
ノート!scriptlet タグはデバッグ専用です。