object in session.... "<logic:present>" with JSTL?
I'm trying to verify if an object is in httpSession, like
I could do with a logic: present using struts taglibs...
but it is not working...
the object IS in setted in the httpSession, so it should print the word "TEST" in every case here:
1) here prints!
...
<logic: present name="userHttpSession" scope="session">
"TEST"
</logic: present>
...
2) here prints!
...
<%
if (session.getAttribute("userHttpSession") != null)
{
out.print("TEST");
}
%>
...
3) here, when the object IS NOT in httpSession, it prints.
but when the object IS in httpSession, it still printing,
but in this case it should not, because here I'm verifying
if it is null.
...
<c:choose>
<c:when test="${sessionScope.userHttpSessionDTO == null}">
"TEST"
</c:when>
</c:choose>
...
anyone can help me??
thanks!!
|