Hi everyone, thanks for reading my question. I appreciate any opinion offered by anyone.
I am working on a company website and trying to include a chunk of HTML code in a
JSP if a user is new to our site. First, I use scriplets like the following
<% if(session.isNew()) {%>
<jsp:include page="greeting.html"></jsp:include>
<% } else {%>
<c:out value="Welcome back"></c:out>
<% };%>
the above scriplet work perfect for my purpose. However, I don't want to use scriplet so I mod the code above using JSTL tags
<c:choose>
<c:when test="session.isNew()">
<jsp:include page="greeting.html"></jsp:include>
</c:when>
<c:otherwise>
<c:out value="Welcome back"></c:out>
</c:otherwise>
</c:choose>
the <c:when> tag is not getting evaluated when I delete the cookie and reopen this JSP. Can anyone suggest where I can change to make it work like the scriplets?
Thank you