만약 ${principal.user.username} 과 ${list.commentUser} 를 비교하고 싶으면
아래처럼 하면 된다.
<c:choose>
<c:when test="${principal.user.username == list.commentUser}">
<span class="delete" onclick="deleteButton(${list.id})" style="cursor:pointer; cursor:hand;"> X</span>
</c:when>
<c:otherwise>
<span class="delete"> </span>
</c:otherwise>
</c:choose>
'유용한 사이트 및 정보' 카테고리의 다른 글
JPA의 양방향 연관관계의 주인 @MappedBy (0) | 2023.02.06 |
---|---|
[Spring] Model(Entity) 유니크 컬럼 만들기 예제 (0) | 2023.02.04 |
개발 필수 아이템 포스트맨 사용법 - 로그인 , ajax의 api통신 포함 (0) | 2023.02.04 |
[Spring Security] 스프링 시큐리티 태그 라이브러리 jsp에서 권한 별 처리 + Gradle (0) | 2023.01.21 |
Repository 네이티브 쿼리 예제 (0) | 2023.01.19 |
댓글