<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<% request.setAttribute("userType","premium"); %>
<c:if test="${requestScope.userType == 'premium'}" var="isPremiumMember" scope="session" >
Welcome! You are a privileged customer.
</c:if>
<br/>
<c:out value="${sessionScope.isPremiumMember}" />
prints,
Welcome! You are a privileged customer.
true
No comments:
Post a Comment