javax.servlet.jsp.el.Expression Java Examples

The following examples show how to use javax.servlet.jsp.el.Expression. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ExpressionEvaluatorImpl.java    From Tomcat8-Source-Read with MIT License 7 votes vote down vote up
@Override
public Expression parseExpression(String expression,
        @SuppressWarnings("rawtypes") Class expectedType,
        FunctionMapper fMapper) throws ELException {
    try {
        ELContextImpl ctx =
            new ELContextImpl(ELContextImpl.getDefaultResolver(factory));
        if (fMapper != null) {
            ctx.setFunctionMapper(new FunctionMapperImpl(fMapper));
        }
        ValueExpression ve = this.factory.createValueExpression(ctx, expression, expectedType);
        return new ExpressionImpl(ve, factory);
    } catch (javax.el.ELException e) {
        throw new ELParseException(e.getMessage());
    }
}
 
Example #2
Source File: ExpressionEvaluatorImpl.java    From Tomcat7.0.67 with Apache License 2.0 6 votes vote down vote up
@Override
public Expression parseExpression(String expression,
        @SuppressWarnings("rawtypes") // API does not use generics
        Class expectedType,
        FunctionMapper fMapper) throws ELException {
    try {
        ELContextImpl ctx =
            new ELContextImpl(ELContextImpl.getDefaultResolver());
        if (fMapper != null) {
            ctx.setFunctionMapper(new FunctionMapperImpl(fMapper));
        }
        ValueExpression ve = this.factory.createValueExpression(ctx, expression, expectedType);
        return new ExpressionImpl(ve);
    } catch (javax.el.ELException e) {
        throw new ELParseException(e.getMessage());
    }
}
 
Example #3
Source File: ExpressionEvaluatorImpl.java    From tomcatsrc with Apache License 2.0 6 votes vote down vote up
@Override
public Expression parseExpression(String expression,
        @SuppressWarnings("rawtypes") // API does not use generics
        Class expectedType,
        FunctionMapper fMapper) throws ELException {
    try {
        ELContextImpl ctx =
            new ELContextImpl(ELContextImpl.getDefaultResolver());
        if (fMapper != null) {
            ctx.setFunctionMapper(new FunctionMapperImpl(fMapper));
        }
        ValueExpression ve = this.factory.createValueExpression(ctx, expression, expectedType);
        return new ExpressionImpl(ve);
    } catch (javax.el.ELException e) {
        throw new ELParseException(e.getMessage());
    }
}
 
Example #4
Source File: ExpressionEvaluatorImpl.java    From packagedrone with Eclipse Public License 1.0 6 votes vote down vote up
public Expression parseExpression(String expression,
                                  Class expectedType,
                                  FunctionMapper fMapper )
        throws ELException {

    ExpressionFactory fac = ExpressionFactory.newInstance();
    javax.el.ValueExpression expr;
    ELContextImpl elContext = new ELContextImpl(null);
    javax.el.FunctionMapper fm = new FunctionMapperWrapper(fMapper);
    elContext.setFunctionMapper(fm);
    try {
        expr = fac.createValueExpression(
                       elContext,
                       expression, expectedType);
    } catch (javax.el.ELException ex) {
        throw new ELException(ex);
    }
    return new ExpressionImpl(expr, pageContext);
}
 
Example #5
Source File: ExpressionEvaluator.java    From Benchmark with GNU General Public License v2.0 4 votes vote down vote up
@Override
public Expression parseExpression(String arg0, Class arg1, FunctionMapper arg2) throws ELException {
	return null;
}