This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JSP and the fly likes Wants to use loop in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "Wants to use loop in jsp" Watch "Wants to use loop in jsp" New topic
Author

Wants to use loop in jsp

Bindu Kasera
Greenhorn

Joined: Aug 03, 2012
Posts: 1
How can i use for loop in jsp
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56179
    
  13

Use the <c:forEach> JSTL tag.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Latif Khan
Greenhorn

Joined: Feb 08, 2012
Posts: 19
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 ");
}
 
I agree. Here's the link: http://jrebel.com/download
 
subject: Wants to use loop in jsp
 
Similar Threads
Adding arrays?
Acess list elements on foreach JSTL tag
Synchronization
for loop within a while?
How do you add objects to arrays?