Sorry, I was probably thinking that current was the varStatus variable. My 
mistake.

-----Original Message-----
From: Dakota Jack [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 12, 2005 5:23 PM
To: Struts Users Mailing List
Subject: Re: Unable to see <c:forEach> out put


I used:

        <td align="left">
        <font color='red'>
          <c:forEach begin="1" end="5" var="current">
            <c:out value="${current}" />
          </c:forEach>
        </font>
        </td>

And this worked fine, gave me:  1 2 3 4 5 in red.

Jack


On Wed, 12 Jan 2005 12:52:59 -0600, Abdullah Jibaly
<[EMAIL PROTECTED]> wrote:
> Actually I think it's ${current.count}
> 
> -----Original Message-----
> From: Kishore Senji [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 12, 2005 12:37 PM
> To: Struts Users Mailing List
> Subject: Re: Unable to see <c:forEach> out put
> 
> On Wed, 12 Jan 2005 13:52:32 +0530, Vamsee Kanakala
> <[EMAIL PROTECTED]> wrote:
> > Rick Reumann wrote:
> >
> > > It sounds like you are probably are now using a JSP2.0 container like
> > > Tomcat5 and are refering to the wrong tld. Refer to the one in the jar
> > > like:
> > >
> > > <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
> > >
> > > and remove and direct pointing to the tlds you have.
> >
> > Yes, I am using Tomcat 5.0.28. I then downloaded beanutils from the
> > jakarta site, replaced the jstl.jar and standard.jar, and pointed to
> > taglibs like you said above. I have strange problem - I am able to use
> > <c:forEach> etc., but the "var" is not getting set. If I give something
> > like this:
> >
> > <c:forEach begin="1" end="5" var="current">
> >          <c:out value="${current}" />
> > </c:forEach>
> >
> > I get something like this:
> >
> > ${current} ${current} ${current} ${current} ${current}
> >
> 
> Well, If you use "var" attribute; <c:forEach/> tries to assign the
> current element of the iteration over a collection to a variable with
> that name. If you don't have any collection specified by the attribute
> "items" then nothing is set to the "var" attribute; in other words a
> variable with that name doesn't exist. If you wanted to see the loop
> counter you could use
> 
> <c:forEach begin="1" end="5" varStatus="current">
>           <c:out value="${current}" />
> </c:forEach>
> 
> > I can't figure out what seems to be the problem. Please help.
> >
> > TIA,
> > Vamsee.
> >
> > ---------------------------------------------------------------------
> > 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]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
------------------------------

"You can lead a horse to water but you cannot make it float on its back."

~Dakota Jack~

"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

-----------------------------------------------

"This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation."

---------------------------------------------------------------------
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