public static <T> T evaluate(ValueExpression expression, PageContext pageContext) {
        if (expression == null) {
            return null;
        }
        @SuppressWarnings("unchecked")
        T value = (T) expression.getValue(pageContext.getELContext());
        return value;
    }
public static < T > T evaluate ( ValueExpression expression , PageContext pageContext ) { if ( expression == null ) { return null ; } @ SuppressWarnings ( "unchecked" ) T value = ( T ) expression . getValue ( pageContext . getELContext ( ) ) ; return value ; }
Evaluate a value expression. To support optional attributes, if the expression is null then
null will be returned.

@param expression the expression
@param pageContext the context for the JSP
@param <T> the expected type of the expression
@return the result of evaluating the expression