Chapter 6: Common Methods in Tags Summary:
1. Support el expressions: import org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager; private Object value = null; this.value = ExpressionEvaluatorManager.evaluate ( "value", value.toString (), Object.class, this, PageContext);
2. Use beanutil to take the attribute value import org.apache.commons.beanutils.propertyUtils; private string protection = null; Object PropertyValue = PropertyUtils.getProperty;
3. Set the value in the request. PageContext.SetAttribute ("var", propertyvalue);
4. Print PageContext.getOut (). Print (OutputString);
5. Take the parent label, get the desired label, even if it is non-father getParent () FindanceStorwithClass (this, Ancestortag.class);
6. The label comes with the belt method and constant, and the method is arranged in the order in which the container is called. Example
Eval_body_skip: Typically in the DostartTAG method, ignore the content included in the tag, if it returns this value, the above C: IF ignores C: OUTEVAL_BODY_INCLUDE: Typically call in the DoafterBody method, execute Body again, if you return this value, C: above C: OUT is executed multiple EVAL_PAGE: You can call in any method. Return to the JSP page