bundles/org.apache.jasper.glassfish/src/org/apache/jasper/runtime/PageContextImpl.java
public static Object evaluateExpression(final String expression, 
					    final Class expectedType,
					    final PageContext pageContext,
					    final ProtectedFunctionMapper functionMap)
	throws ELException
    {
	Object retValue;
        if (SecurityUtil.isPackageProtectionEnabled()){
            try {
                retValue = AccessController.doPrivileged(
                    new PrivilegedExceptionAction<Object>(){

                    public Object run() throws Exception{
                        ELContextImpl elContext =
                            (ELContextImpl) pageContext.getELContext();
                        elContext.setFunctionMapper(functionMap);
                        ExpressionFactory expFactory = getExpressionFactory(pageContext);
                        ValueExpression expr =
                             expFactory.createValueExpression(
                                                   elContext,
                                                   expression,
                                                   expectedType);
                        return expr.getValue(elContext);
                    }
                });
            } catch (PrivilegedActionException ex) {
                Exception realEx = ex.getException();
		if (realEx instanceof ELException) {
		    throw (ELException) realEx;
		} else {
		    throw new ELException(realEx);
		}
            }
        } else {
            ELContextImpl elContext = (ELContextImpl)pageContext.getELContext();
            elContext.setFunctionMapper(functionMap);
            ExpressionFactory expFactory = getExpressionFactory(pageContext);
            ValueExpression expr = expFactory.createValueExpression(
                                           elContext,
                                           expression,
                                           expectedType);
            retValue = expr.getValue(elContext);
        }
	return retValue;
    }
public static Object evaluateExpression(final String expression, 
					    final Class expectedType,
					    final PageContext pageContext,
					    final ProtectedFunctionMapper functionMap)
	throws ELException
    {
	Object retValue;
        if (SecurityUtil.isPackageProtectionEnabled()){
            try {
                retValue = AccessController.doPrivileged(
                    new PrivilegedExceptionAction<Object>(){

                    public Object run() throws Exception{
                        ELContextImpl elContext =
                            (ELContextImpl) pageContext.getELContext();
                        elContext.setFunctionMapper(functionMap);
                        ExpressionFactory expFactory = getExpressionFactory(pageContext);
                        ValueExpression expr =
                             expFactory.createValueExpression(
                                                   elContext,
                                                   expression,
                                                   expectedType);
                        return expr.getValue(elContext);
                    }
                });
            } catch (PrivilegedActionException ex) {
                Exception realEx = ex.getException();
		if (realEx instanceof ELException) {
		    throw (ELException) realEx;
		} else {
		    throw new ELException(realEx);
		}
            }
        } else {
            ELContextImpl elContext = (ELContextImpl)pageContext.getELContext();
            elContext.setFunctionMapper(functionMap);
            ExpressionFactory expFactory = getExpressionFactory(pageContext);
            ValueExpression expr = expFactory.createValueExpression(
                                           elContext,
                                           expression,
                                           expectedType);
            retValue = expr.getValue(elContext);
        }
	return retValue;
    }
public static Object evaluateExpression ( final String expression , final Class expectedType , final PageContext pageContext , final ProtectedFunctionMapper functionMap ) throws ELException { Object retValue ; if ( SecurityUtil . isPackageProtectionEnabled ( ) ) { try { retValue = AccessController . doPrivileged ( new PrivilegedExceptionAction < Object > ( ) { public Object run ( ) throws Exception { ELContextImpl elContext = ( ELContextImpl ) pageContext . getELContext ( ) ; elContext . setFunctionMapper ( functionMap ) ; ExpressionFactory expFactory = getExpressionFactory ( pageContext ) ; ValueExpression expr = expFactory . createValueExpression ( elContext , expression , expectedType ) ; return expr . getValue ( elContext ) ; } } ) ; } catch ( PrivilegedActionException ex ) { Exception realEx = ex . getException ( ) ; if ( realEx instanceof ELException ) { throw ( ELException ) realEx ; } else { throw new ELException ( realEx ) ; } } } else { ELContextImpl elContext = ( ELContextImpl ) pageContext . getELContext ( ) ; elContext . setFunctionMapper ( functionMap ) ; ExpressionFactory expFactory = getExpressionFactory ( pageContext ) ; ValueExpression expr = expFactory . createValueExpression ( elContext , expression , expectedType ) ; retValue = expr . getValue ( elContext ) ; } return retValue ; }
Evaluates an EL expression

@param expression The expression to be evaluated
@param expectedType The expected resulting type
@param pageContext The page context
@param functionMap Maps prefix and name to Method
@return The result of the evaluation
Evaluates an EL expression