WAS v8.5 > Reference > Developer detailed usage informationtsx:repeat tag JSP syntax (deprecated)
The <tsx:repeat> tag repeats a block of HTML tagging.
Support for tsx tags in the JSP engine are deprecated in WebSphere Application Server v6.0. Instead of using the tsx tags, you should use equivalent tags from the JSP Standard Tag Library (JSTL).
Use the <tsx:repeat> syntax to iterate over a database query results set. The <tsx:repeat> syntax iterates from the start value to the end value until one of the following conditions is met:
- The end value is reached.
- An exception is thrown.
If an exception of the types ArrayIndexOutOfBoundsException or NoSuchElementException is created before a block completes, output is written only for the iterations up to and not including the iteration during which the exception was created. All other exceptions results in no output being written for that tag instance.
This section describes the syntax of the <tsx:repeat> tag:
<tsx:repeat index="name" start="starting_index" end="ending_index"> </tsx:repeat>
where:
- index
Represents an optional name used to identify the index of this repeat block. The scope of the index is NESTED. Its type must be integer.
- start
Represents an optional starting index value for this repeat block. The default is 0.
- end
Represents an optional ending index value for this repeat block. Maximum value is 2,147,483,647.
If the value of the end attribute is less than the value of the start attribute, the end attribute is ignored.
Combining tsx:repeat and tsx:getProperty JSP tags (deprecated)
Support for tsx tags in the JSP engine are deprecated in WAS v6.0. Instead of using the tsx tags, you should use equivalent tags from the JSP Standard Tag Library (JSTL).
The following code snippet shows you how to code these tags:
<tsx:repeat> <tr> <td><tsx:getProperty name="empqs" property="EMPNO" /> <tsx:getProperty name="empqs" property="FIRSTNME" /> <tsx:getProperty name="empqs" property="WORKDEPT" /> <tsx:getProperty name="empqs" property="EDLEVEL" /> </td> </tr> </tsx:repeat>
Related concepts:
JSP
Related
Use installed optional packages
Manage shared libraries
Reference:
Web applications: Resources for learning