Vita Contemplativa/개발
[JSTL] 쿠키 값 이용
intelligentia
2014. 8. 20. 17:37
태그라이브러리로 for each 문을 돌면서 목록을 구성할 때 체크박스를 쿠키값에 저장되어있는 권한값에 따라 disabled 처리를 해줘야해서 JSTL로 쿠키 값 받는 방법을 사용했다.
사용법 : ${cookie.쿠키이름.value} 로 접근
▼ 사용예시
1
2
3
4
5
6
7
8
|
<c:choose>
<c:when test="${cookie.쿠키명.value eq 10001">
<input type="checkbox" disabled="true" />
</c:when>
<c:otherwise>
<input type="checkbox" />
</c:otherwise>
</c:choose>
|
728x90