1 16 17 package org.apache.taglibs.xtags.xpath; 18 19 import java.io.IOException ; 20 21 import javax.servlet.jsp.PageContext ; 22 23 import org.dom4j.Node; 24 import org.dom4j.rule.Action; 25 26 31 public class JspValueOfAction implements Action { 32 33 34 private PageContext pageContext; 35 36 37 public JspValueOfAction() { 38 } 39 40 public JspValueOfAction(PageContext pageContext) { 41 this.pageContext = pageContext; 42 } 43 44 45 48 public PageContext getPageContext() { 49 return pageContext; 50 } 51 52 55 public void setPageContext(PageContext pageContext) { 56 this.pageContext = pageContext; 57 } 58 59 60 61 public void run( Node node ) throws Exception { 64 String text = node.getStringValue(); 65 if ( text != null && text.length() > 0 ) { 66 text = ValueOfTag.encode( text ); 67 68 pageContext.getOut().print( text ); 69 } 70 } 71 } 72 | Popular Tags |