org.springframework.web.servlet.tags
Class HtmlEscapingAwareTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.springframework.web.servlet.tags.RequestContextAwareTag
org.springframework.web.servlet.tags.HtmlEscapingAwareTag
- All Implemented Interfaces:
- Serializable, IterationTag, JspTag, Tag, TryCatchFinally
- Direct Known Subclasses:
- BindErrorsTag, BindTag, EscapeBodyTag, MessageTag, TransformTag
public abstract class HtmlEscapingAwareTag
- extends RequestContextAwareTag
Superclass for tags that emit content that might get HTML-escaped.
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.
- Since:
- 1.1
- Author:
- Juergen Hoeller
- See Also:
setHtmlEscape(java.lang.String)
,
HtmlEscapeTag
,
RequestContext.isDefaultHtmlEscape()
,
WebUtils.isDefaultHtmlEscape(javax.servlet.ServletContext)
,
Serialized Form
Method Summary |
protected boolean |
isHtmlEscape()
Return the HTML escaping setting for this tag,
or the default setting if not overridden. |
void |
setHtmlEscape(String htmlEscape)
Set HTML escaping for this tag, as boolean value. |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HtmlEscapingAwareTag
public HtmlEscapingAwareTag()
setHtmlEscape
public void setHtmlEscape(String htmlEscape)
throws JspException
- Set HTML escaping for this tag, as boolean value.
Overrides the default HTML escaping setting for the current page.
- Throws:
JspException
- See Also:
HtmlEscapeTag.setDefaultHtmlEscape(java.lang.String)
isHtmlEscape
protected boolean isHtmlEscape()
- Return the HTML escaping setting for this tag,
or the default setting if not overridden.
Copyright (c) 2002-2005 The Spring Framework Project.