|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jasper.runtime.JspApplicationContextImpl
public class JspApplicationContextImpl
Implementation of JspApplicationContext
Constructor Summary | |
---|---|
JspApplicationContextImpl()
|
Method Summary | |
---|---|
void |
addELContextListener(javax.el.ELContextListener listener)
Registers a ELContextListener s so that context objects
can be added whenever a new ELContext is created. |
void |
addELResolver(javax.el.ELResolver resolver)
Adds an ELResolver to affect the way EL variables
and properties are resolved for EL expressions appearing in JSP pages
and tag files. |
ELContextImpl |
createELContext(javax.servlet.jsp.JspContext context)
|
javax.el.ExpressionFactory |
getExpressionFactory()
Returns a factory used to create ValueExpression s and
MethodExpression s so that EL expressions can be
parsed and evaluated. |
static JspApplicationContextImpl |
getInstance(javax.servlet.ServletContext context)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JspApplicationContextImpl()
Method Detail |
---|
public void addELContextListener(javax.el.ELContextListener listener)
javax.servlet.jsp.JspApplicationContext
ELContextListener
s so that context objects
can be added whenever a new ELContext
is created.
At a minimum, the ELContext
objects created will
contain a reference to the JspContext
for this request,
which is added by the JSP container.
This is sufficient for all the
default ELResolver
s listed in JspApplicationContext.addELResolver(javax.el.ELResolver)
.
Note that JspContext.class
is used as the key to ELContext.putContext()
for the JspContext
object reference.
This method is generally used by frameworks and applications that
register their own ELResolver
that needs context other
than JspContext
. The listener will typically add the
necessary context to the ELContext
provided in the
event object. Registering a listener that adds context allows the
ELResolver
s in the stack to access the context they
need when they do a resolution.
addELContextListener
in interface javax.servlet.jsp.JspApplicationContext
listener
- The listener to be notified when a new
ELContext
is created.public static JspApplicationContextImpl getInstance(javax.servlet.ServletContext context)
public ELContextImpl createELContext(javax.servlet.jsp.JspContext context)
public void addELResolver(javax.el.ELResolver resolver) throws java.lang.IllegalStateException
javax.servlet.jsp.JspApplicationContext
ELResolver
to affect the way EL variables
and properties are resolved for EL expressions appearing in JSP pages
and tag files.
For example, in the EL expression ${employee.lastName}, an
ELResolver
determines what object "employee"
references and how to find its "lastName" property.
When evaluating an expression, the JSP container will consult a set of standard resolvers as well as any resolvers registered via this method. The set of resolvers are consulted in the following order:
ImplicitObjectELResolver
ELResolver
s registered via this method, in the
order in which they are registered.MapELResolver
ListELResolver
ArrayELResolver
BeanELResolver
ScopedAttributeELResolver
It is illegal to register an ELResolver
after the
application has received any request from the client. If an
attempt is made to register an ELResolver
after that time,
an IllegalStateException
is thrown.
ELResolver
s are in the chain,
aside from the standard ones. It is permissible to add
ELResolver
s before or after initialization to
a CompositeELResolver
that is already in the chain.
It is not possible to remove an ELResolver
registered
with this method, once it has been registered.
addELResolver
in interface javax.servlet.jsp.JspApplicationContext
resolver
- The new ELResolver
java.lang.IllegalStateException
- if an attempt is made to
call this method after all ServletContextListener
s
have had their contextInitialized
methods invoked.public javax.el.ExpressionFactory getExpressionFactory()
javax.servlet.jsp.JspApplicationContext
ValueExpression
s and
MethodExpression
s so that EL expressions can be
parsed and evaluated.
getExpressionFactory
in interface javax.servlet.jsp.JspApplicationContext
ExpressionFactory
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |