FileDocCategorySizeDatePackage
EchoAttributesTag.javaAPI DocGlassfish v2 API3008Fri May 04 22:34:22 BST 2007jsp2.examples.simpletag

EchoAttributesTag

public class EchoAttributesTag extends javax.servlet.jsp.tagext.SimpleTagSupport implements javax.servlet.jsp.tagext.DynamicAttributes
SimpleTag handler that echoes all its attributes

Fields Summary
private ArrayList
keys
private ArrayList
values
Constructors Summary
Methods Summary
public voiddoTag()


          
	JspWriter out = getJspContext().getOut();
	for( int i = 0; i < keys.size(); i++ ) {
	    String key = (String)keys.get( i );
	    Object value = values.get( i );
	    out.println( "<li>" + key + " = " + value + "</li>" );
        }
    
public voidsetDynamicAttribute(java.lang.String uri, java.lang.String localName, java.lang.Object value)

	keys.add( localName );
	values.add( value );