FileDocCategorySizeDatePackage
UrlTag.javaAPI DocGlassfish v2 API4647Sat May 05 19:17:56 BST 2007org.apache.taglibs.standard.tag.el.core

UrlTag

public class UrlTag extends org.apache.taglibs.standard.tag.common.core.UrlSupport

A handler for <urlEncode> that accepts attributes as Strings and evaluates them as expressions at runtime.

author
Shawn Bayern

Fields Summary
private String
value_
private String
context_
Constructors Summary
public UrlTag()
Constructs a new URLEncodeTag. As with TagSupport, subclasses should not provide other constructors and are expected to call the superclass constructor

        super();
        init();
    
Methods Summary
public intdoStartTag()


        // evaluate any expressions we were passed, once per invocation
        evaluateExpressions();

	// chain to the parent implementation
	return super.doStartTag();
    
private voidevaluateExpressions()

        /* 
         * Note: we don't check for type mismatches here; we assume
         * the expression evaluator will return the expected type
         * (by virtue of knowledge we give it about what that type is).
         * A ClassCastException here is truly unexpected, so we let it
         * propagate up.
         */

	value = (String) ExpressionUtil.evalNotNull(
	    "url", "value", value_, String.class, this, pageContext);
	context = (String) ExpressionUtil.evalNotNull(
	    "url", "context", context_, String.class, this, pageContext);
    
private voidinit()

        // null implies "no expression"
	value_ = null;
    
public voidrelease()

        super.release();
        init();
    
public voidsetContext(java.lang.String context_)

        this.context_ = context_;
    
public voidsetValue(java.lang.String value_)

        this.value_ = value_;