FileDocCategorySizeDatePackage
FooTag.javaAPI DocGlassfish v2 API3464Fri May 04 22:34:22 BST 2007examples

FooTag

public class FooTag extends ExampleTagBase
Example1: the simplest tag Collect attributes and call into some actions

Fields Summary
private String[]
atts
int
i
Constructors Summary
Methods Summary
public intdoAfterBody()

        try {
            if (i == 3) {
                bodyOut.writeOut(bodyOut.getEnclosingWriter());
                return SKIP_BODY;
            } else
                pageContext.setAttribute("member", atts[i]);
            i++;
            return EVAL_BODY_TAG;
        } catch (IOException ex) {
            throw new JspTagException(ex.toString());
        }
    
public voiddoInitBody()

        pageContext.setAttribute("member", atts[i]);
        i++;
    
public intdoStartTag()
Process start tag

return
EVAL_BODY_INCLUDE

        i = 0;
	return EVAL_BODY_TAG;
    
private final voidsetAtt(int index, java.lang.String value)

    
           
        atts[index] = value;
    
public voidsetAtt1(java.lang.String value)

        setAtt(0, value);
    
public voidsetAtt2(java.lang.String value)

        setAtt(1, value);
    
public voidsetAtt3(java.lang.String value)

        setAtt(2, value);