「JSTL」c:ifでフィールドの値が空を判定する

書式
!empty 変数名
使用例

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<c:if test="${!empty username}">
${username}
</c:if>
<c:if test="${!empty username}"> ${username} </c:if>
 <c:if test="${!empty username}">
  ${username}
</c:if>

 

JSTL

Posted by arkgame