FileDocCategorySizeDatePackage
LogTag.javaAPI DocApache Tomcat 6.0.141810Fri Jul 20 04:20:30 BST 2007examples

LogTag

public class LogTag extends ExampleTagBase
Log the contents of the body. Could be used to handle errors etc.

Fields Summary
boolean
toBrowser
Constructors Summary
Methods Summary
public intdoAfterBody()

        try {
            String s = bodyOut.getString();
            System.err.println(s);
            if (toBrowser)
                bodyOut.writeOut(bodyOut.getEnclosingWriter());
            return SKIP_BODY;
        } catch (IOException ex) {
            throw new JspTagException(ex.toString());
        }
    
public intdoStartTag()

        return EVAL_BODY_BUFFERED;
    
public voidsetToBrowser(java.lang.String value)

    
        
        if (value == null)
            toBrowser = false;
        else if (value.equalsIgnoreCase("true"))
            toBrowser = true;
        else
            toBrowser = false;