FileDocCategorySizeDatePackage
Remove.javaAPI DocApache Tomcat 6.0.141774Fri Jul 20 04:20:36 BST 2007org.apache.jasper.tagplugins.jstl.core

Remove

public class Remove extends Object implements org.apache.jasper.compiler.tagplugin.TagPlugin

Fields Summary
Constructors Summary
Methods Summary
public voiddoTag(org.apache.jasper.compiler.tagplugin.TagPluginContext ctxt)

        
        //scope flag
        boolean hasScope = ctxt.isAttributeSpecified("scope");
        
        //the value of the "var"
        String strVar = ctxt.getConstantAttribute("var");
        
        //remove attribute from certain scope.
        //default scope is "page".
        if(hasScope){
            int iScope = Util.getScope(ctxt.getConstantAttribute("scope"));
            ctxt.generateJavaSource("pageContext.removeAttribute(\"" + strVar + "\"," + iScope + ");");
        }else{
            ctxt.generateJavaSource("pageContext.removeAttribute(\"" + strVar + "\");");
        }