Class EscapeToHtmlTag

  • All Implemented Interfaces:
    javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.SimpleTag

    public class EscapeToHtmlTag
    extends javax.servlet.jsp.tagext.SimpleTagSupport
    Implements the wmedit:escapeToHtml tag. This tag umlifies the given string value. If the var attribute is set, the result is bound to the var in the pagecontext, else the result of the lookup is printed. This functionality should be used when a string is rendered within an attribute value of an html (or xml) tag.
    Author:
    arjans
    • Constructor Detail

      • EscapeToHtmlTag

        public EscapeToHtmlTag()
    • Method Detail

      • setVar

        public void setVar​(String var)
        Setter for the optional var attribute.
        Parameters:
        var - name of the variable to which the escaped value will be assigned.
      • getVar

        protected String getVar()
        Return name of the variable to which the escaped value will be assigned or null.
        Returns:
        name of the variable to which the escaped value will be assigned or null if not set.
      • setValue

        public void setValue​(String value)
        Setter for the required value attribute.
        Parameters:
        value - value that is to be escaped.
      • getValue

        protected String getValue()
        Return the escaped value.
        Returns:
        the escaped value.
      • doTag

        public void doTag()
                   throws javax.servlet.jsp.JspException
        Specified by:
        doTag in interface javax.servlet.jsp.tagext.SimpleTag
        Overrides:
        doTag in class javax.servlet.jsp.tagext.SimpleTagSupport
        Throws:
        javax.servlet.jsp.JspException