我是 JSF 和 EL 的新手,但为什么这不起作用?
<c:if test="#{not empty user.link}">
<div class="userLink">
<a href="#{user.link}">
<img src="img/usericon.png" width="75" height="auto"/>
</a>
</div>
</c:if>
即使字符串永远不会为空,图像也永远不会显示。我已经尝试过 user.link.length() gt 0、user.link.length > 0、user.link != null、not user.link eq null 等等。似乎没有任何效果。任何帮助将不胜感激。