org.springframework.web.servlet.tags
Class EvalTag
java.lang.Object
TagSupport
org.springframework.web.servlet.tags.RequestContextAwareTag
org.springframework.web.servlet.tags.HtmlEscapingAwareTag
org.springframework.web.servlet.tags.EvalTag
public class EvalTag
- extends HtmlEscapingAwareTag
JSP tag for evaluating expressions with the Spring Expression Language (SpEL).
Supports the standard JSP evaluation context consisting of implicit variables and scoped attributes.
- Since:
- 3.0.1
- Author:
- Keith Donald, Juergen Hoeller
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EVALUATION_CONTEXT_PAGE_ATTRIBUTE
private static final java.lang.String EVALUATION_CONTEXT_PAGE_ATTRIBUTE
javax.servlet.jsp.PageContext
attribute for the
page-level EvaluationContext
instance.
- See Also:
- Constant Field Values
expressionParser
private final ExpressionParser expressionParser
expression
private Expression expression
var
private java.lang.String var
scope
private int scope
javaScriptEscape
private boolean javaScriptEscape
EvalTag
public EvalTag()
setExpression
public void setExpression(java.lang.String expression)
- Set the expression to evaluate.
setVar
public void setVar(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(java.lang.String javaScriptEscape)
throws JspException
- Set JavaScript escaping for this tag, as boolean value.
Default is "false".
- Throws:
JspException
doStartTagInternal
public int doStartTagInternal()
throws JspException
- Description copied from class:
RequestContextAwareTag
- Called by doStartTag to perform the actual work.
- Specified by:
doStartTagInternal
in class RequestContextAwareTag
- Returns:
- same as TagSupport.doStartTag
- Throws:
JspException
- See Also:
javax.servlet.jsp.tagext.TagSupport#doStartTag
doEndTag
public int doEndTag()
throws JspException
- Throws:
JspException
createEvaluationContext
private EvaluationContext createEvaluationContext(PageContext pageContext)
getConversionService
private ConversionService getConversionService(PageContext pageContext)