• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Wants to use loop in jsp

 
Bindu Kasera
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can i use for loop in jsp
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use the <c:forEach> JSTL tag.
 
Abdul Aatif
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bindu Kasera wrote:How can i use for loop in jsp



<c:forEach var="i" begin="1" end="10">
hello <br>
</c:forEach>

is equal to:

for(int i=1;i<=10;i++){
System.out.println("hello ");
}
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic