본문 바로가기

개발/기타

JSTL / equal

null check


<c:if test="${param.data != ''}">

 

위 방법은 안될떄가 있다고 함. 그래서 아랫걸로..

 

<c:if test="${param.data != '' || param.data ne null}">

 

로 사용 하면 된다. (ne 는 not equal 인 것으로 보인다.)

 

반대로 equal 을 찾을 땐

 

< c:if test="${param.data eq null }">

 

로 조건을 걸면 된다.



출처:http://shonm.tistory.com/entry/JSP-JSTL-null-equal-%EA%B4%80%EB%A0%A8-%EB%AC%B8%EB%B2%95