I am trying to print some html when a choose / when condition is met like this:
<c:choose>
<c:when test="${notification.placeId} == ${place.placeId}">
${notification.name}
</c:when>
<c:otherwise>
placeId: ${place.placeId} - notplaceid: ${notification.placeId}
</c:otherwise>
</c:choose>
这打印: placeId:50 - notplaceid:43 placeId:50 - notplaceid:47 placeId:50 - notplaceid:49 placeId:50 - notplaceid:50 placeId:50 - notplaceid:51 placeId:50 - notplaceid:51 placeId:50 - notplaceid : 51 placeId: 50 - notplaceid: 51 placeId: 50 - notplaceid: 52 placeId: 50 - notplaceid: 53 placeId: 50 - notplaceid: 0 placeId: 50 - notplaceid: 0
这一切都从 else 打印出来,并且从不打印 when 语句中的通知名称。从打印中可以看出,粗体输出显然满足 when 条件,应该打印通知名称。
有谁知道发生了什么?