For loop taglib ver. 1.4

    Custom JSP tag. Lets you program basic loops.

For example:
 


<%@ taglib uri="taglib.tld" prefix="do" %>
<html>

<do:forLoop var="i" from="1" to="10" step="2">

   <!-- body will be executed 5 times -->
   <br>loop variable is <%=i%>

</do:forLoop>

</html>

Tags are:

forLoop

Iterates over own body according to the loop parameters. Parameters are:

1) var loop variable. Describes a nested page scope variable. Type is java.lang.Integer. You may use this variable within tag's body.
2) from Describes an initial value.
3) to Describes a final value
4) step Optional parameter. Describes how to increase/decrease (in case of negative value) loop variable. Default value is 1
 

for downloading:

    Library: fortag.jar    Description: taglib.tld

 © Coldbeans Software      Comments?

  See also Coldtags suite - the largest collection of custom JSP tags.