To evaluate an Expression , an ELContext must be
provided. The ELContext holds:
a reference to the base ELResolver that will be consulted
to resolve model objects and their properties
a reference to FunctionMapper that will be used
to resolve EL Functions.
a reference to VariableMapper that will be used
to resolve EL Variables.
a collection of all the relevant context objects for use by
ELResolvers
state information during the evaluation of an expression, such as
whether a property has been resolved yet
The collection of context objects is necessary because each
ELResolver may need access to a different context object.
For example, JSP and Faces resolvers need access to a
JspContext and a
FacesContext , respectively.
Creation of ELContext objects is controlled through
the underlying technology. For example, in JSP the
JspContext.getELContext() factory method is used.
Some technologies provide the ability to add an ELContextListener
so that applications and frameworks can ensure their own context objects
are attached to any newly created ELContext.
Because it stores state during expression evaluation, an
ELContext object is not thread-safe. Care should be taken
to never share an ELContext instance between two or more
threads.
To evaluate an Expression , an
ELContextmust be provided. TheELContextholds:ELResolversThe collection of context objects is necessary because each
ELResolvermay need access to a different context object. For example, JSP and Faces resolvers need access to a JspContext and a FacesContext , respectively.Creation of
ELContextobjects is controlled through the underlying technology. For example, in JSP theJspContext.getELContext()factory method is used. Some technologies provide the ability to add an ELContextListener so that applications and frameworks can ensure their own context objects are attached to any newly createdELContext.Because it stores state during expression evaluation, an
ELContextobject is not thread-safe. Care should be taken to never share anELContextinstance between two or more threads.