1 16 17 package org.apache.taglibs.standard.tag.common.xml; 18 19 import javax.servlet.jsp.JspException ; 20 import javax.servlet.jsp.JspTagException ; 21 import javax.servlet.jsp.tagext.TagSupport ; 22 23 28 29 public abstract class ExprSupport extends TagSupport { 30 31 34 private String select; protected boolean escapeXml; 37 40 45 public ExprSupport() { 46 super(); 47 init(); 48 } 49 50 private void init() { 52 select = null; 53 escapeXml = true; 54 } 55 56 57 60 public int doStartTag() throws JspException { 62 try { 63 XPathUtil xu = new XPathUtil(pageContext); 64 String result = xu.valueOf(XPathUtil.getContext(this), select); 65 org.apache.taglibs.standard.tag.common.core.OutSupport.out( 66 pageContext, escapeXml, result); 67 return SKIP_BODY; 68 } catch (java.io.IOException ex) { 69 throw new JspTagException (ex.toString(), ex); 70 } 71 } 72 73 public void release() { 75 super.release(); 76 init(); 77 } 78 79 80 83 public void setSelect(String select) { 84 this.select = select; 85 } 86 } 87 | Popular Tags |