FileDocCategorySizeDatePackage
RepeatSimpleTag.javaAPI DocGlassfish v2 API2629Fri May 04 22:34:22 BST 2007jsp2.examples.simpletag

RepeatSimpleTag

public class RepeatSimpleTag extends javax.servlet.jsp.tagext.SimpleTagSupport
SimpleTag handler that accepts a num attribute and invokes its body 'num' times.

Fields Summary
private int
num
Constructors Summary
Methods Summary
public voiddoTag()

        for (int i=0; i<num; i++) {
            getJspContext().setAttribute("count", String.valueOf( i + 1 ) );
	    getJspBody().invoke(null);
        }
    
public voidsetNum(int num)

	this.num = num;