<c:set var="userType" scope="request" value="none" />
<c:choose>
<c:when test="${requestScope.userType == 'regular'}">
Welcome! You are a regular user.
</c:when>
<c:when test="${requestScope.userType == 'premium'}">
Welcome! You are a premium user.
</c:when>
<c:otherwise>
Welcome! You are not a registered user.
</c:otherwise>
</c:choose>
prints,
Welcome! You are not a registered user.
No comments:
Post a Comment