寫前端jsp的form表單的使用JSTL標籤顯示集合的時候,代碼如下:
<c:forEach var="p" items="${requestScope.querylist}">
<tr><td hidden="true">${p.uid}</td>
<td>${p.uname}</td>
</tr>
</c:forEach>
解決辦法:需要在jsp首行page標籤裏添加isELIgnored=false,代碼如下:
<%@ page language="java" import="java.util.*" contentType="charset=utf-8"
pageEncoding="utf-8" isELIgnored="false" %>
<!-- 開頭<%@ page>標籤中的isELIgnored 是EL表達式是否顯示的關鍵字,不寫默認爲true,EL表達式失效或不能不顯示 -->
參看網上說明尋出答案,在此記錄。