| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.springframework.web.util.ExpressionEvaluationUtils
Convenience methods for easy access to the JSP Expression Language evaluator of Jakarta's JSTL implementation.
The evaluation methods check if the value contains "${" before invoking the EL evaluator, treating the value as "normal" expression (i.e. conventional String) else.
Note: The evaluation methods do not have a runtime dependency on Jakarta's JSTL implementation, as long as they don't receive actual EL expressions.
| Constructor Summary | |
| ExpressionEvaluationUtils() | |
| Method Summary | |
| static java.lang.Object | evaluate(java.lang.String attrName,
         java.lang.String attrValue,
         java.lang.Class resultClass,
         javax.servlet.jsp.PageContext pageContext)Evaluate the given expression to an Object, be it EL or a conventional String. | 
| static boolean | evaluateBoolean(java.lang.String attrName,
                java.lang.String attrValue,
                javax.servlet.jsp.PageContext pageContext)Evaluate the given expression to a boolean, be it EL or a conventional String. | 
| static int | evaluateInteger(java.lang.String attrName,
                java.lang.String attrValue,
                javax.servlet.jsp.PageContext pageContext)Evaluate the given expression to an integer, be it EL or a conventional String. | 
| static java.lang.String | evaluateString(java.lang.String attrName,
               java.lang.String attrValue,
               javax.servlet.jsp.PageContext pageContext)Evaluate the given expression to a String, be it EL or a conventional String. | 
| static boolean | isExpressionLanguage(java.lang.String value)Check if the given expression value is an EL expression. | 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
public ExpressionEvaluationUtils()
| Method Detail | 
public static boolean isExpressionLanguage(java.lang.String value)
value - the expression to check
true if the expression is an EL expression,
 false otherwise
public static java.lang.Object evaluate(java.lang.String attrName,
                                        java.lang.String attrValue,
                                        java.lang.Class resultClass,
                                        javax.servlet.jsp.PageContext pageContext)
                                 throws javax.servlet.jsp.JspException
attrName - name of the attribute (typically a JSP tag attribute)attrValue - value of the attributeresultClass - class that the result should have (String, Integer, Boolean)pageContext - current JSP PageContext
javax.servlet.jsp.JspException - in case of parsing errors
public static java.lang.String evaluateString(java.lang.String attrName,
                                              java.lang.String attrValue,
                                              javax.servlet.jsp.PageContext pageContext)
                                       throws javax.servlet.jsp.JspException
attrName - name of the attribute (typically a JSP tag attribute)attrValue - value of the attributepageContext - current JSP PageContext
javax.servlet.jsp.JspException - in case of parsing errors
public static int evaluateInteger(java.lang.String attrName,
                                  java.lang.String attrValue,
                                  javax.servlet.jsp.PageContext pageContext)
                           throws javax.servlet.jsp.JspException
attrName - name of the attribute (typically a JSP tag attribute)attrValue - value of the attributepageContext - current JSP PageContext
javax.servlet.jsp.JspException - in case of parsing errors
public static boolean evaluateBoolean(java.lang.String attrName,
                                      java.lang.String attrValue,
                                      javax.servlet.jsp.PageContext pageContext)
                               throws javax.servlet.jsp.JspException
attrName - name of the attribute (typically a JSP tag attribute)attrValue - value of the attributepageContext - current JSP PageContext
javax.servlet.jsp.JspException - in case of parsing errors| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||