티스토리 뷰

JAVA/JSTL

jstl 널 체크

KIMSG 2017. 7. 21. 15:59

=============================================== Sample =============================================

Ex) eq (==)

1. <c:if test="${ null eq test_column }"> // null

2. <c:if test="${ 0 eq test_column }"> // 숫자

3. <c:if test="${ '0' eq test_column }"> // 문자

Ex) empty

<c:if test="${ empty test_columnMap }"> // list, map 객체 등

<c:if test="${ !empty test_columnMap }"> // 비어 있지 않은 경우

Ex) ne (!=)

1. <c:if test="${ null ne test_column }"> // null

2. <c:if test="${ 0 ne test_column }"> // 숫자

3. <c:if test="${ '0' ne test_column }"> // 문자

<c:if test="${null ne result.gn_seq}">수정</c:if>

<c:if test="${null eq result.gn_seq}">등록</c:if>



http://a07274.tistory.com/221

'JAVA > JSTL' 카테고리의 다른 글

fn으로 특정 문자열 자르기  (0) 2017.07.21
jstl / fmt(포맷) 숫자 or 날짜  (0) 2017.07.21
jstl 나누기 와 형태 변환  (0) 2017.07.21
jstl 에서 fn 사용법  (0) 2017.07.21
fn 사용법 2  (0) 2017.07.21
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함