• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Problem coming while using c:forEach tag

 
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI

I am using struts 1.2 and using the following loop :

<c:forEach var="abcd" begin="1" end="5">
${abcd}
</c:forEach>

in actual the output should be 1,2,3,4,5

But in my case it is printing "${abcd}" 5 times.

Could you please tell me that what mistake i am doing and what should i do to rectify this.

Regards
Gaurav
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your web container is not compliant with the JSP 2.0 spec or above, you will need to write:

<c:forEach var="abcd" begin="1" end="5">
<c:out value="${abcd}" />
</c:forEach>
[ February 06, 2006: Message edited by: Merrill Higginson ]
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic