Java 嵌套c:选择“标记不工作”
我正在处理一个jsp页面,该页面包含以下代码:Java 嵌套c:选择“标记不工作”,java,jsp,Java,Jsp,我正在处理一个jsp页面,该页面包含以下代码: <c:choose> <c:when test="${profile.blocked != '1'"> <div>Message Me</div> <c:choose> <c:when test="${profile.favourite == '0'}"> <div>Add Favourite</div> </c:when> &
<c:choose>
<c:when test="${profile.blocked != '1'">
<div>Message Me</div>
<c:choose>
<c:when test="${profile.favourite == '0'}">
<div>Add Favourite</div>
</c:when>
<c:otherwise>
<div>Remove Favourite</div>
</c:otherwise>
</c:choose>
<c:choose>
<c:when test="${profile.intimate == '0'}">
<div>Add Friend</div>
</c:when>
<c:otherwise>
<div>Remove Friend</div>
</c:otherwise>
</c:choose>
</c:when>
<c:otherwise>
<div>Profile Blocked</div>
</c:otherwise>
</c:choose>
给我留言
添加收藏夹
删除收藏夹
加朋友
除掉朋友
轮廓阻塞
问题是,当配置文件被阻止时,配置文件被阻止消息不显示。我知道底层代码没有问题,所以它一定是我的前端代码中的某个东西。您的
中缺少}
,当
标记:
<c:when test="${profile.blocked != '1'">
应该是
<c:when test="${profile.blocked != '1'}">
缩进xml有助于提高可读性。谢谢,这很有效。我会尽快记下正确答案。