1 16 17 package org.springframework.web.servlet.tags; 18 19 import javax.servlet.jsp.JspException ; 20 21 import org.springframework.web.util.ExpressionEvaluationUtils; 22 23 38 public abstract class HtmlEscapingAwareTag extends RequestContextAwareTag { 39 40 private Boolean htmlEscape; 41 42 43 48 public void setHtmlEscape(String htmlEscape) throws JspException { 49 this.htmlEscape = 50 new Boolean (ExpressionEvaluationUtils.evaluateBoolean("htmlEscape", htmlEscape, pageContext)); 51 } 52 53 57 protected boolean isHtmlEscape() { 58 if (this.htmlEscape != null) { 59 return this.htmlEscape.booleanValue(); 60 } 61 else { 62 return getRequestContext().isDefaultHtmlEscape(); 63 } 64 } 65 66 } 67 | Popular Tags |