FileDocCategorySizeDatePackage
EchoAttributesTag.javaAPI DocApache Tomcat 6.0.141827Fri Jul 20 04:20:36 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 );