public abstract class HtmlEscapingAwareTag extends RequestContextAwareTag
Provides a "htmlEscape" property for explicitly specifying whether to
apply HTML escaping. If not set, a page-level default (e.g. from the
HtmlEscapeTag) or an application-wide default (the "defaultHtmlEscape"
context-param in web.xml
) is used.
setHtmlEscape(boolean)
,
HtmlEscapeTag
,
RequestContext.isDefaultHtmlEscape()
,
WebUtils.isDefaultHtmlEscape(ServletContext)
Modifier and Type | Field and Description |
---|---|
private java.lang.Boolean |
htmlEscape |
logger, REQUEST_CONTEXT_PAGE_ATTRIBUTE
Constructor and Description |
---|
HtmlEscapingAwareTag() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
isDefaultHtmlEscape()
Return the applicable default HTML escape setting for this tag.
|
protected boolean |
isHtmlEscape()
Return the HTML escaping setting for this tag,
or the default setting if not overridden.
|
void |
setHtmlEscape(boolean htmlEscape)
Set HTML escaping for this tag, as boolean value.
|
doCatch, doFinally, doStartTag, doStartTagInternal, getRequestContext
public void setHtmlEscape(boolean htmlEscape) throws JspException
JspException
HtmlEscapeTag.setDefaultHtmlEscape(boolean)
protected boolean isHtmlEscape()
isDefaultHtmlEscape()
protected boolean isDefaultHtmlEscape()
The default implementation checks the RequestContext's setting,
falling back to false
in case of no explicit default given.