Class HtmlEscapeTag

  • All Implemented Interfaces:
    java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag, javax.servlet.jsp.tagext.TryCatchFinally

    public class HtmlEscapeTag
    extends CurrentActivityAwareTag
    The <htmlEscape> tag 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.

    Attribute Summary
    Attribute Required? Runtime Expression? Description
    defaultHtmlEscape true true Set the default value for HTML escaping, to be put into the current PageContext.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String DEFAULT_HTML_ESCAPE_SETTING_NAME
      HTML escape parameter at the servlet context level (i.e.
      • 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

      Constructors 
      Constructor Description
      HtmlEscapeTag()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected int doStartTagInternal()
      Called by doStartTag to perform the actual work.
      void setDefaultHtmlEscape​(boolean defaultHtmlEscape)
      Set the default value for HTML escaping, to be put into 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

      • DEFAULT_HTML_ESCAPE_SETTING_NAME

        public static final java.lang.String DEFAULT_HTML_ESCAPE_SETTING_NAME
        HTML escape parameter at the servlet context level (i.e. a context-param in web.xml): "defaultHtmlEscape".
        See Also:
        Constant Field Values
    • Constructor Detail

      • HtmlEscapeTag

        public HtmlEscapeTag()
    • Method Detail

      • setDefaultHtmlEscape

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

        protected int doStartTagInternal()
                                  throws javax.servlet.jsp.JspException
        Description copied from class: CurrentActivityAwareTag
        Called by doStartTag to perform the actual work.
        Specified by:
        doStartTagInternal in class CurrentActivityAwareTag
        Returns:
        same as TagSupport.doStartTag
        Throws:
        javax.servlet.jsp.JspException
        See Also:
        TagSupport.doStartTag()