Whoops, I guess you do know for sure that the bean exists in the proper scope. Ignore my previous post please.
Hey, you're not trying to do this with those <jsp: > tags in there are you? That could be confusing the Struts tags...if you use the <bean:define> and <bean:write> tags by themselves (no <jsp:> tags), it should work. If it doesn't, check the html source in your browser and make sure the tags aren't just being ignored completely (which is what will happen if you don't reference the .tld properly or something). peace, Joe > -----Original Message----- > From: Vinh Tran [mailto:[EMAIL PROTECTED]] > Sent: Monday, September 23, 2002 2:41 PM > To: Struts Users Mailing List > Subject: RE: logic:present on session bean > > > 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]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

