Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

object in session.... "<logic:present>" with JSTL?

session

  • Please log in to reply
No replies to this topic

#1 reachpradeep

reachpradeep

    CC Regular

  • Just Joined
  • PipPipPip
  • 41 posts

Posted 04 March 2007 - 06:46 AM

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!!
  • 0





Also tagged with one or more of these keywords: session

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download