FileDocCategorySizeDatePackage
LogTag.javaAPI DocGlassfish v2 API2988Fri May 04 22:34:22 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_TAG;
    
public voidsetToBrowser(java.lang.String value)

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