1
當我嘗試訪問wrap.myUtilDate
我得到一個錯誤:如何從scriptlet訪問c:forEach循環值?
`wrap.myUtilDate` cannot be resolved to a type
能c:forEach
循環值從一個小腳本訪問?
<c:forEach items="${myWraps}" var="wrap" varStatus="status">
<%
java.util.Date myUtilDate = wrap.myUtilDate;
org.joda.time.DateTime myJodaDate = new org.joda.time.DateTime(myUtilDate);
%>
<td><joda:format value="${myJodaDate}" style="LL"/></td>
</c:forEach>
嘗試循環之前聲明變量。 –