1 16 17 package org.apache.taglibs.standard.tag.el.core; 18 19 import javax.servlet.jsp.JspException ; 20 21 import org.apache.taglibs.standard.tag.common.core.NullAttributeException; 22 import org.apache.taglibs.standard.tag.common.core.OutSupport; 23 24 30 31 public class OutTag extends OutSupport { 32 33 36 private String value_; private String default_; private String escapeXml_; 40 41 44 public OutTag() { 45 super(); 46 init(); 47 } 48 49 50 53 public int doStartTag() throws JspException { 55 56 evaluateExpressions(); 58 59 return super.doStartTag(); 61 } 62 63 64 public void release() { 66 super.release(); 67 init(); 68 } 69 70 71 74 public void setValue(String value_) { 75 this.value_ = value_; 76 } 77 78 public void setDefault(String default_) { 79 this.default_ = default_; 80 } 81 82 public void setEscapeXml(String escapeXml_) { 83 this.escapeXml_ = escapeXml_; 84 } 85 86 87 90 private void init() { 92 value_ = default_ = escapeXml_ = null; 94 } 95 96 97 private void evaluateExpressions() throws JspException { 98 try { 99 value = ExpressionUtil.evalNotNull( 100 "out", "value", value_, Object .class, this, pageContext); 101 } catch (NullAttributeException ex) { 102 value = null; 104 } 105 try { 106 def = (String ) ExpressionUtil.evalNotNull( 107 "out", "default", default_, String .class, this, pageContext); 108 } catch (NullAttributeException ex) { 109 def = null; 111 } 112 escapeXml = true; 113 Boolean escape = ((Boolean ) ExpressionUtil.evalNotNull( 114 "out", "escapeXml", escapeXml_, Boolean .class, this, pageContext)); 115 if (escape != null) 116 escapeXml = escape.booleanValue(); 117 } 118 } 119 | Popular Tags |