standard taglib * implementation of the JSP Standard Tag Library * 
Examples     Introduction * General Purpose * Conditionals * Iterators * Import * I18N & Formatting Tags * XML Tags * Misc.

Iterator Tags Examples

Simple  

Simply displays the default toString() value of the items in the Customers collection.

Range  

Similar to the previous example, except that there is no collection to iterate over. The items attribute is optional in the <forEach> tag. When it is not specified, the range attributes must be used to iterate a specific number of times over the tag's body. This example simply iterates over the integer values specified by the range attributes.

Data Types  

The <forEach> tag supports a large number of data types for the collection of objects to iterate over. This example features the following data types: array of primitives, array of objects, Enumeration, Properties (Map), String (Comma Separated Values).

Iteration Status  

Provides some of the status information that the iterator tag collects about the current iteration.

<forTokens>  

A specialization for the handling of Strings of tokens. The <forEach> tag provides the basic iteration capabilities. Essentially the same as <forEach>, except that it only applies to Strings of tokens and has an extra attribute, delims, to specify the token delimiter.

standard taglib * implementation of the JSP Standard Tag Library * 


Copyright 2006 Sun Microsystems, Inc. All rights reserved.