com.interface21.web.servlet.tags
Class HtmlEscapeTag

java.lang.Object
  |
  +--javax.servlet.jsp.tagext.TagSupport
        |
        +--com.interface21.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(boolean), Serialized Form

Field Summary
static java.lang.String HTML_ESCAPE_CONTEXT_PARAM
          ServletContext init parameter (web.xml context-param)
static java.lang.String HTML_ESCAPE_PAGE_ATTR
          PageContext attribute for page-level default
 
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
 
Constructor Summary
HtmlEscapeTag()
           
 
Method Summary
 int doStartTag()
           
static boolean isDefaultHtmlEscape(javax.servlet.jsp.PageContext pageContext)
          Retrieves the default HTML escaping setting from the given PageContext, falling back to the ServletContext init parameter.
 void setDefaultHtmlEscape(boolean 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
 

Field Detail

HTML_ESCAPE_CONTEXT_PARAM

public static final java.lang.String HTML_ESCAPE_CONTEXT_PARAM
ServletContext init parameter (web.xml context-param)

HTML_ESCAPE_PAGE_ATTR

public static final java.lang.String HTML_ESCAPE_PAGE_ATTR
PageContext attribute for page-level default
Constructor Detail

HtmlEscapeTag

public HtmlEscapeTag()
Method Detail

isDefaultHtmlEscape

public static boolean isDefaultHtmlEscape(javax.servlet.jsp.PageContext pageContext)
Retrieves the default HTML escaping setting from the given PageContext, falling back to the ServletContext init parameter.

setDefaultHtmlEscape

public void setDefaultHtmlEscape(boolean defaultHtmlEscape)
Set the default value for HTML escaping, to be put in the current PageContext.

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Overrides:
doStartTag in class javax.servlet.jsp.tagext.TagSupport


Rod Johnson and Spring contributors 2001-2003.