1. when/choose
<c:choose> <c:when test="${cateId==20}"> <img src="<%=request.getContextPath()%>/images/02_sub_tab2_shop.jpg" border="0" usemap="#Map3" /> </c:when> <c:when test="${cateId==30}"> <img src="<%=request.getContextPath()%>/images/02_sub_tab3_cul.jpg" border="0" usemap="#Map3" /> </c:when> <c:when test="${cateId==40}"> <img src="<%=request.getContextPath()%>/images/02_sub_tab4_entain.jpg" border="0" usemap="#Map3" /> </c:when> <c:otherwise> <img src="<%=request.getContextPath()%>/images/02_sub_tab1_food.jpg" border="0" usemap="#Map3" /> </c:otherwise> </c:choose> |
2. set 연산
<c:set var="i" value="0" /> <c:set var="i" value="${i+1}" /> |
3. foreach : 지정 회수만큼 반복
<c:forEach var="i" begin="1" end="6" step="1"> <tr> <td height="25" class="k_label13">쿠폰아이디 ${i}</td> <td height="25" class="dataLabel12L2" bgcolor="#FFFFFF"> <input type="text" name="arrStrCpnId" maxlength="20" style="width: 50%; height: 20px" /> </td> </tr> </c:forEach> |
'Programming > Java/JSP' 카테고리의 다른 글
자바에서 split을 사용하려면... (1) | 2010.07.08 |
---|---|
JSTL에서 forEach, forTokens 실전 사용(varStatus ) (0) | 2010.07.01 |
String으로 날짜 받아서 일자 더하기. (0) | 2010.03.10 |
HttpURLConnection을 이용한 POST연동방식 (1) | 2010.02.01 |
간단한 DB Connection Test파일(JSP) (0) | 2009.11.18 |