关于jsp页面上,el表达式相等的问题
我jsp页面上的代码是:<span>loginPlayer.username:${sessionScope.loginPlayer.username}</span><sp...
我jsp页面上的代码是:
<span>loginPlayer.username:${sessionScope.loginPlayer.username }</span>
<span>comment.username:${comment.username }</span>
<c:if test="${sessionScope.loginPlayer.username == comment.username} ">
<span>相等</span>
</c:if>
<c:if test="${sessionScope.loginPlayer.username != comment.username} ">
<span>不相等</span>
</c:if>
但是结果只输出:
loginPlayer.username:zsmj
comment.username:zsmj
不知道为什么了,求各位大侠赐教 展开
<span>loginPlayer.username:${sessionScope.loginPlayer.username }</span>
<span>comment.username:${comment.username }</span>
<c:if test="${sessionScope.loginPlayer.username == comment.username} ">
<span>相等</span>
</c:if>
<c:if test="${sessionScope.loginPlayer.username != comment.username} ">
<span>不相等</span>
</c:if>
但是结果只输出:
loginPlayer.username:zsmj
comment.username:zsmj
不知道为什么了,求各位大侠赐教 展开
6个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询