Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/376.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 嵌套c:选择“标记不工作”_Java_Jsp - Fatal编程技术网

Java 嵌套c:选择“标记不工作”

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> &

我正在处理一个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: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有助于提高可读性。谢谢,这很有效。我会尽快记下正确答案。