1:判断List当中是否包含当前值:
yxmkList是 moduleId 的List
<c:if test="${fn:contains(yxmkList, one.moduleId)}">checked="checked"</c:if>
2:使用 sessionScope 变量的 EL 表达式
如:
yxmkList是 moduleId 的List
<c:if test="${fn:contains(yxmkList, one.moduleId)}">checked="checked"</c:if>
2:使用 sessionScope 变量的 EL 表达式
<%request.getSession().setAttribute("sampleValue", new Integer(10));%>
${sessionScope.sampleValue}
3:截取字符串如:
<c:set var="log.logTitle"
value="做一个截取字符串长度的测试"
<c:choose>
<c:when
test="${fn:length(log.logTitle) >
10}">
<c:out
value="${fn:substring(log.logTitle, 0, 10)}......"
/>
</c:when>
<c:otherwise>
<c:out
value="${log.logTitle}" />
</c:otherwise>
</c:choose>
<c:choose>