Is "org.apache.struts.MyCustomBean" the name you put it into the session
with? You'll use the same attribute name to get it back out as you did
to put it there.
<locic:present name="beanName">
...
</logic:present>
<locic:notPresent name="beanName">
...
</logic:notPresent>
- or the way I like to do it -
<c:choose>
<c:when test="${empty beanName}">
...
</c:when>
<c:otherwise>
...
</c:otherwise>
</c:choose>
Ok, in this case it's actually more lines of code - but the JSTL has the
ability to be recognized and optimized by the container - can't say that
for the logic tags!
Vinh Tran wrote:
>All:
>
>I have a custom bean that is placed in a user session. How can I detect if
>the bean exist in the session? I have tried the following but it does not
>work. Is there a better method for accomplishing this? Thanks.
>
>
><logic:notPresent name="org.apache.struts.MyCustomBean">
> do something.....
></logic:notPresent>
>
><logic:present name="org.apache.struts.MyCustomBean">
> do something else...
></logic:present>
>
--
Eddie Bush
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>