Class EvalTag

  • 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 EvalTag
    extends HtmlEscapingAwareTag
    The <eval> tag evaluates an Aspectran expression (SpEL) and either prints the result or assigns it to a variable. Supports the standard JSP evaluation context consisting of implicit variables and scoped attributes.
    Attribute Summary
    Attribute Required? Runtime Expression? Description
    expression true true The expression to evaluate.
    htmlEscape false true Set HTML escaping for this tag, as a boolean value. Overrides the default HTML escaping setting for the current page.
    javaScriptEscape false true Set JavaScript escaping for this tag, as a boolean value. Default is false.
    scope false true The scope for the var. 'application', 'session', 'request' and 'page' scopes are supported. Defaults to page scope. This attribute has no effect unless the var attribute is also defined.
    var false true The name of the variable to export the evaluation result to. If not specified the evaluation result is converted to a String and written as output.

    Created: 2021/02/05

    See Also:
    Serialized Form
    • Field Summary

      • 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
      EvalTag()  
    • Constructor Detail

      • EvalTag

        public EvalTag()
    • Method Detail

      • setExpression

        public void setExpression​(@Nullable
                                  java.lang.String expression)
        Set the expression to evaluate.
      • setVar

        public void setVar​(@Nullable
                           java.lang.String var)
        Set the variable name to expose the evaluation result under. Defaults to rendering the result to the current JspWriter.
      • setScope

        public void setScope​(java.lang.String scope)
        Set the scope to export the evaluation result to. This attribute has no meaning unless var is also defined.
      • setJavaScriptEscape

        public void setJavaScriptEscape​(boolean javaScriptEscape)
        Set JavaScript escaping for this tag, as boolean value. Default is "false".
      • doStartTagInternal

        public 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()
      • doEndTag

        public int doEndTag()
                     throws javax.servlet.jsp.JspException
        Specified by:
        doEndTag in interface javax.servlet.jsp.tagext.Tag
        Overrides:
        doEndTag in class javax.servlet.jsp.tagext.TagSupport
        Throws:
        javax.servlet.jsp.JspException