문서의 이전 판입니다!
List Size값 출력
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> ${resultList.size} X ${fn:length(resultList)} O
LIST 순회
<c:forEach var="entry" items="${resultMap}" varStatus="status"> <tr> <td>${entry.key}</td> <td>${entry.value}</td> <td>${entry.key.class}</td> </tr> </c:forEach>
키값으로 값 불러오기 1
<c:out value="${resultMap['${key}']} />
키값으로 값 불러오기 2
<c:set var="idAsString">${resultInfo.id }</c:set> <c:out value="${resultMap[idAsString].id }" />
null: <c:if test="${ null eq name }"></c:if> 숫자: <c:if test="${ 0 eq name }"></c:if> 문자: <c:if test="${ 'string' eq name }"></c:if>
ne or !=
null: <c:if test="${ null ne name }"></c:if> 숫자: <c:if test="${ 0 eq name }"></c:if> 문자: <c:if test="${ 'string' eq name }"></c:if>
empty
객체의 값이 비어있을 때: <c:if test="${empty map}"</c:if> 객체의 값이 있을 때: <c:if test="${!empty map}"></c:if>