Ok, well if I do the following:
    <c:set var="cfb" value="${formBean}"/>
    <c:out value="${cfb}"/>

The name of the form object is written out.  But if I want to access a
property on my form cfb, how would I output that value?  If I write <c:out
value="${cfb.pageNumber}"/>, I get a servlet exception saying that it is
unable to find "pageNumber" in object of class "java.lang.String"

Any ideas?

----- Original Message -----
From: "Paul McCulloch" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Friday, June 18, 2004 12:33 PM
Subject: RE: bean defines


> <bean:define> will create a new local variable in the jsp. You can access
> this variable in a scriptlet or an RT expression. <c:out> is looking for a
> scoped *attribute* (not a variable) with that name, so it will fail.
>
> If you look at the servlet source generated from your jsp source you
should
> see what I'm talking about.
>
> You can use <c:set> to create a scoped attribute which is accessible from
> <c:out>, or you could use the c-rt taglib.
>
> HTH,
>
> Paul
>
> > -----Original Message-----
> > From: Chris Cranford [mailto:[EMAIL PROTECTED]
> > Sent: 18 June 2004 17:24
> > To: Struts Users Mailing List
> > Subject: bean defines
> >
> >
> > If I define a bean using bean:define from a named bean in the
> > request/session scope, why when I use the JSTL C taglib, does
> > it not see the properties of this bean?
> >
> > For example:
> >     <bean:define id="myForm"><tiles:getAsString
> > name="formid"/></bean:define>
> >     UserName: <bean:write id="myForm" property="userName"/>
> >     UserName: <c:out value="${myForm.userName}"/>
> >
> > The bean:write works but the c:out fails.  Any clues?
> > Chris
> >
> >
>
>
> **********************************************************************
> Axios Email Confidentiality Footer
> Privileged/Confidential Information may be contained in this message. If
you are not the addressee indicated in this message (or responsible for
delivery of the message to such person), you may not copy or deliver this
message to anyone. In such case, you should destroy this message, and notify
us immediately. If you or your employer does not consent to Internet email
messages of this kind, please advise us immediately. Opinions, conclusions
and other information expressed in this message are not given or endorsed by
my Company or employer unless otherwise indicated by an authorised
representative independent of this message.
> WARNING:
> While Axios Systems Ltd takes steps to prevent computer viruses from being
transmitted via electronic mail attachments we cannot guarantee that
attachments do not contain computer virus code.  You are therefore strongly
advised to undertake anti virus checks prior to accessing the attachment to
this electronic mail.  Axios Systems Ltd grants no warranties regarding
performance use or quality of any attachment and undertakes no liability for
loss or damage howsoever caused.
> **********************************************************************
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



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

Reply via email to