On Sun, 15 Dec 2002, Mark Conlin wrote:

> Date: Sun, 15 Dec 2002 19:15:48 -0500
> From: Mark Conlin <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
> Subject: RE: Iterate tag Tomcat 4.1.12, issue or no?
>
>
> Okay, here is what did it.
>
> <logic:iterate id="myMess" name="messages">
>       <bean:write name="myMess" property="subject"/>
> </logic:iterate>
>
> So I have to user bean taglib to access a bean inside of an interate tag
> ?
> I can't just access it by using <%= myMess.getSubject() %> ???
>
> I can live with that, I just don't understand why...
>

That's actually simple ... the <logic:iterate> tag does not create a
scripting variable.  It only stores the current element you are iterating
over in the attribute defined by "name".  Scripting variables are only
needed if you're going to use scriptlets or runtime expressions, and in
general that (especially scriptlets) is discouraged.

NOTE:  When you start using JSTL, you'll find that the iteration tags in
that library act the same way.

> Mark
>

Craig


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

Reply via email to