세션 속성이 비어 있으면 JSTL에서 테스트하려고합니다. 그러나 속성은 비어 있습니다. JSTL은 비어 있지 않은 속성으로 간주합니다.JSTL : 문자열이 비어 있는지 확인하십시오.
이것은 JSTL로 대체하려는 하드 코드입니다. 이 코드는 올바르게 작동하고 있습니다.
<% if (request.getAttribute("error") != null) { %>
<div class="alert alert-danger">
<strong>Oh snap, something's wrong, maybe the following error could help you out?<br /></strong>
<%= request.getAttribute("error")%>
</div>
<% } %>
이 코드를 JSTL로 바꿉니다. 이 옵션을 선택하면 error-attribute는 비어 있지 않지만 비어 있습니다. session attribute
이 비어있는 경우 내가 JSTL에서 테스트하기 위해 노력하고있어
<c:if test="${not empty sessionScope.error}">
<div class="alert alert-danger">
<strong>Oh snap, something's wrong, maybe the following error could help you out?<br /></strong>
<c:out value="${sessionScope.error}" />
</div>
</c:if>
당신이 페이지에서 JSTL 태그를 가져온 – gyanu
JSTL 라이브러리를 추가 한이다 ** <% @ taglib uri = "http://java.sun.com/jsp/jstl/core"prefix = "c"%> ** – gyanu
정말 문제였습니다. 1 시간 이상이 문제를 해결하고있었습니다. 감사합니다 :) – DaanCelie