Search in sources :

Example 6 with ELResolver

use of jakarta.el.ELResolver in project tomcat by apache.

the class JspApplicationContextImpl method createELContext.

public ELContextImpl createELContext(JspContext context) {
    if (context == null) {
        throw new IllegalArgumentException(Localizer.getMessage("jsp.error.nullArgument"));
    }
    // create ELContext for JspContext
    final ELResolver r = this.createELResolver();
    ELContextImpl ctx;
    if (Constants.IS_SECURITY_ENABLED) {
        ctx = AccessController.doPrivileged((PrivilegedAction<ELContextImpl>) () -> new ELContextImpl(r));
    } else {
        ctx = new ELContextImpl(r);
    }
    ctx.putContext(JspContext.class, context);
    // alert all ELContextListeners
    fireListeners(ctx);
    return ctx;
}
Also used : ELResolver(jakarta.el.ELResolver) CompositeELResolver(jakarta.el.CompositeELResolver) JasperELResolver(org.apache.jasper.el.JasperELResolver) PrivilegedAction(java.security.PrivilegedAction) ELContextImpl(org.apache.jasper.el.ELContextImpl)

Aggregations

ELResolver (jakarta.el.ELResolver)6 PropertyNotFoundException (jakarta.el.PropertyNotFoundException)3 CompositeELResolver (jakarta.el.CompositeELResolver)1 ELContext (jakarta.el.ELContext)1 ELException (jakarta.el.ELException)1 LambdaExpression (jakarta.el.LambdaExpression)1 StandardELContext (jakarta.el.StandardELContext)1 TesterPageContext (jakarta.servlet.jsp.TesterPageContext)1 ImplicitObjectELResolver (jakarta.servlet.jsp.el.ImplicitObjectELResolver)1 PrivilegedAction (java.security.PrivilegedAction)1 ArrayList (java.util.ArrayList)1 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)1 Optional (org.apache.el.stream.Optional)1 StreamELResolverImpl (org.apache.el.stream.StreamELResolverImpl)1 ELContextImpl (org.apache.jasper.el.ELContextImpl)1 JasperELResolver (org.apache.jasper.el.JasperELResolver)1 Test (org.junit.Test)1