인프런 커뮤니티 질문&답변
안녕하세요. 개인적으로 하다가 타임리프 관련 질문이 있어서 문의드립니다.
작성
·
202
0
개인적으로 JSP 에서 타임리프로 변경하면서 진행하다가 잘 모르겠어서 문의드립니다.
Retrofit 을 사용해서 진행하고 있는데요. 기존 JSP 에서는 이렇게 진행을 했었는데요.
가령 타임리프로 이런식으로 해보았습니다. th:href 랑 th:src 쪽 문제같다고 저는 생각을 하는데요.
링크 표현식이 아니라서 @ 이거를 써주면 안되는거 같기는한데 찾아봐도 잘 모르겠어서 이렇게 문의 드립니다. (__)
<table border="1" th:if="${image != null && image.documents.size() > 0}">
<thead>
<tr th:each="item, status : ${image}">
<td th:if="${status.index % 6 == 0 && status.index + 1 % 6 == 0}">
<a th:href="@{item.docUrl}">
<img th:src="@{item.thumbnail_url}">
</a>
</td>
</tr>
</thead>
</table>
<table th:unless="${image != null && image.documents.size() > 0}">
</table>
<c:when test=${image != null && image.documents.size() > 0}">
<table border="1">
<c:forEach var="item" items="${image.documents}" varStatus="status">
<c:if test="${status.index % 6 == 0}">
<tr>
</c:if>
<td>
<a href="${item.docUrl}">
<img src="${mite.thumbnail_url}" />
</a>
</td>
<c:if test=${status.index + 1 % 6 == 0}">
</tr>
</c:if>
</c:forEach>
</table>
</c:when>






그렇군요 감사합니다 !