Reputation: 9
I am getting value 0 and one from database, and i want to compare that value in my jsp page, I tried below code, but its not comparing correctly.
<c:choose>
<c:when test="%{#groupProfileView.userinfo. profilePrivacy}== 1">
creator name: ${groupProfileView.userinfo.firstName}
</c:when>
<c:otherwise>anonmous</c:otherwise>
</c:choose>
Upvotes: 0
Views: 94
Reputation: 42020
If profilePrivacy
is a number, try the next:
<c:when test="${groupProfileView.userinfo.profilePrivacy == 1}">
If profilePrivacy
is a string, try the next:
<c:when test="${groupProfileView.userinfo.profilePrivacy == '1'}">
Upvotes: 1
Reputation: 240900
change it to
<c:when test='${groupProfileView.userinfo.profilePrivacy eq "1"'>
Related
Upvotes: 0