'jstl 비교연산'에 해당되는 글 1건

JSTL의 비교연산, ep, ne, empty

[의미]

1. eq = equal (==)

2. ne = not equal (!=)

3. empty = list,map등의 객체가 값이 있다,없다를 구분(ex)empty, !empty)


[사용예시]

[eq]

 null

  <c:if test="${ null eq columnName }">

 숫자

  <c:if test="${ 0 eq columnName }">

 문자

  <c:if test="${ '0' eq columnName }">

[ne (!=)]

 null

  <c:if test="${ null ne columnName }"> 

 숫자

  <c:if test="${ 0 ne columnName }"> 

 문자

  <c:if test="${ '0' ne columnName }">

[empty]

 객체의 값이 비어있다.

 <c:if test="${ empty  columnMap}">

객체의 값이 있다.

 <c:if test="${ !empty  columnMap}">





[실제 적용 소스]




[출처] eq, ne, empty 사용|작성자 맛동산

'개발Story > Jstl' 카테고리의 다른 글

[게시판 만들기] C태그  (0) 2016.02.26
블로그 이미지

galaxyvom

◆개발자 놀이터 아직 초보라 글에 실수가 있을 수 있습니다 ;-)

,