org.springframework.web.servlet.tags
Class HtmlEscapeTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.springframework.web.servlet.tags.HtmlEscapeTag
- All Implemented Interfaces:
- javax.servlet.jsp.tagext.IterationTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag
- public class HtmlEscapeTag
- extends javax.servlet.jsp.tagext.TagSupport
Sets default HTML escape value for the current page. The actual value
can be overridden by escaping-aware tags. The default is "false".
Note: You can also set a "defaultHtmlEscape" web.xml context-param.
A page-level setting overrides a context-param.
- Since:
- 04.03.2003
- Author:
- Juergen Hoeller
- See Also:
RequestContextAwareTag.setHtmlEscape(java.lang.String)
,
Serialized Form
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
id, pageContext |
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag |
EVAL_BODY_AGAIN |
Fields inherited from interface javax.servlet.jsp.tagext.Tag |
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Method Summary |
int |
doStartTag()
|
static boolean |
isDefaultHtmlEscape(javax.servlet.jsp.PageContext pageContext)
Retrieve the default HTML escaping setting from the given PageContext,
falling back to the ServletContext init parameter. |
void |
setDefaultHtmlEscape(java.lang.String defaultHtmlEscape)
Set the default value for HTML escaping,
to be put in the current PageContext. |
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 |
HTML_ESCAPE_CONTEXT_PARAM
public static final java.lang.String HTML_ESCAPE_CONTEXT_PARAM
- ServletContext init parameter (web.xml context-param)
- See Also:
- Constant Field Values
HTML_ESCAPE_PAGE_ATTR
public static final java.lang.String HTML_ESCAPE_PAGE_ATTR
- PageContext attribute for page-level default
- See Also:
- Constant Field Values
HtmlEscapeTag
public HtmlEscapeTag()
setDefaultHtmlEscape
public void setDefaultHtmlEscape(java.lang.String defaultHtmlEscape)
throws javax.servlet.jsp.JspException
- Set the default value for HTML escaping,
to be put in the current PageContext.
- Throws:
javax.servlet.jsp.JspException
doStartTag
public int doStartTag()
throws javax.servlet.jsp.JspException
- Throws:
javax.servlet.jsp.JspException
isDefaultHtmlEscape
public static boolean isDefaultHtmlEscape(javax.servlet.jsp.PageContext pageContext)
- Retrieve the default HTML escaping setting from the given PageContext,
falling back to the ServletContext init parameter.
Copyright (C) 2003-2004 The Spring Framework Project.