I know the bean is in the proper scope because when I use the following tags
I can retrieve the attributes on the bean. The following works:

<jsp:useBean id="mybean" scope="session" type="org.apache.MyBean"/>
<jsp:getProperty name="mybean" property="myattr"/>

The strange thing is when I use the <bean:define> tags I get no results. The
following does not work. Could this be why logic:present does not work
either?

<bean:define id="mybean" name="org.apache.MyBean" scope="session"
ignore="true"/>
<bean:write name="mybean" property="myattr"/>

Vinh

-----Original Message-----
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 23, 2002 5:17 PM
To: 'Struts Users Mailing List'
Subject: RE: logic:present on session bean


What does "it does not work" mean?  Are you sure the bean has been
instantiated and is in proper scope?

Mark

-----Original Message-----
From: Vinh Tran [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 23, 2002 4:18 PM

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>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to