By taking a peek at the source, I found that they do make an ArrayList
which contains Integers from "begin" to "end". So the acutal problem
for not showing those values on the page is something else and I guess
,by looking at the first posting, you are using the runtime version of
the jstl core library.

The runtime version doesn't evaluate expressions. So, make sure your
point to the expression tld one or try this:

<c:forEach begin="1" end="5" var="current">
  <c:out value='<%=(String)pageContext.getAttribute("current")%>'/>
</c:forEach>


On Wed, 12 Jan 2005 15:25:03 -0800, Dakota Jack <[EMAIL PROTECTED]> wrote:
> I had
> <%@ taglib uri='jstl-core'      prefix='c' %>
> on the page and
> 
>  <!--============================================================
>  JSTL CORE EL
>  =============================================================-->
>  <taglib>
>    <taglib-uri>jstl-core</taglib-uri>
>    <taglib-location>/WEB-INF/resource/tld/c.tld</taglib-location>
>  </taglib>
> 
> in web.xml.
> 
> Jack
> 
> On Wed, 12 Jan 2005 15:23:01 -0800, Dakota Jack <[EMAIL PROTECTED]> wrote:
> > 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."
> >
> 
> --
> ------------------------------
> 
> "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