📄 jspapplicationcontext.html
字号:
<P><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="addELResolver(javax.el.ELResolver)"><!-- --></A><H3>addELResolver</H3><PRE>void <B>addELResolver</B>(<A HREF="../../../javax/el/ELResolver.html" title="class in javax.el">ELResolver</A> resolver)</PRE><DL><DD>Adds an <code>ELResolver</code> to affect the way EL variables and properties are resolved for EL expressions appearing in JSP pages and tag files. <p>For example, in the EL expression ${employee.lastName}, an <code>ELResolver</code> determines what object "employee" references and how to find its "lastName" property.</p> <p>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: <ul> <li><A HREF="../../../javax/servlet/jsp/el/ImplicitObjectELResolver.html" title="class in javax.servlet.jsp.el"><CODE>ImplicitObjectELResolver</CODE></A></li> <li><code>ELResolver</code>s registered via this method, in the order in which they are registered.</li> <li><A HREF="../../../javax/el/MapELResolver.html" title="class in javax.el"><CODE>MapELResolver</CODE></A></li> <li><A HREF="../../../javax/el/ListELResolver.html" title="class in javax.el"><CODE>ListELResolver</CODE></A></li> <li><A HREF="../../../javax/el/ArrayELResolver.html" title="class in javax.el"><CODE>ArrayELResolver</CODE></A></li> <li><A HREF="../../../javax/el/BeanELResolver.html" title="class in javax.el"><CODE>BeanELResolver</CODE></A></li> <li><A HREF="../../../javax/servlet/jsp/el/ScopedAttributeELResolver.html" title="class in javax.servlet.jsp.el"><CODE>ScopedAttributeELResolver</CODE></A></li> </ul></p> <p>It is illegal to register an <code>ELResolver</code> after the application has received any request from the client. If an attempt is made to register an <code>ELResolver</code> after that time, an <code>IllegalStateException</code> is thrown.</p> This restriction is in place to allow the JSP container to optimize for the common case where no additional <code>ELResolver</code>s are in the chain, aside from the standard ones. It is permissible to add <code>ELResolver</code>s before or after initialization to a <code>CompositeELResolver</code> that is already in the chain.</p> <p>It is not possible to remove an <code>ELResolver</code> registered with this method, once it has been registered.</p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>resolver</CODE> - The new <code>ELResolver</code><DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if an attempt is made to call this method after all <code>ServletContextListener</code>s have had their <code>contextInitialized</code> methods invoked.</DL></DD></DL><HR><A NAME="getExpressionFactory()"><!-- --></A><H3>getExpressionFactory</H3><PRE><A HREF="../../../javax/el/ExpressionFactory.html" title="class in javax.el">ExpressionFactory</A> <B>getExpressionFactory</B>()</PRE><DL><DD>Returns a factory used to create <code>ValueExpression</code>s and <code>MethodExpression</code>s so that EL expressions can be parsed and evaluated.<P><DD><DL><DT><B>Returns:</B><DD>A concrete implementation of the an <code>ExpressionFactory</code>.</DL></DD></DL><HR><A NAME="addELContextListener(javax.el.ELContextListener)"><!-- --></A><H3>addELContextListener</H3><PRE>void <B>addELContextListener</B>(<A HREF="../../../javax/el/ELContextListener.html" title="interface in javax.el">ELContextListener</A> listener)</PRE><DL><DD>Registers a <code>ELContextListener</code>s so that context objects can be added whenever a new <code>ELContext</code> is created. <p>At a minimum, the <code>ELContext</code> objects created will contain a reference to the <code>JspContext</code> for this request, which is added by the JSP container. This is sufficient for all the default <code>ELResolver</code>s listed in <A HREF="../../../javax/servlet/jsp/JspApplicationContext.html#addELResolver(javax.el.ELResolver)"><CODE>addELResolver(javax.el.ELResolver)</CODE></A>. Note that <code>JspContext.class</code> is used as the key to ELContext.putContext() for the <code>JspContext</code> object reference.</p> <p>This method is generally used by frameworks and applications that register their own <code>ELResolver</code> that needs context other than <code>JspContext</code>. The listener will typically add the necessary context to the <code>ELContext</code> provided in the event object. Registering a listener that adds context allows the <code>ELResolver</code>s in the stack to access the context they need when they do a resolution.</p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - The listener to be notified when a new <code>ELContext</code> is created.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../javax/servlet/jsp/HttpJspPage.html" title="interface in javax.servlet.jsp"><B>PREV CLASS</B></A> <A HREF="../../../javax/servlet/jsp/JspContext.html" title="class in javax.servlet.jsp"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?javax/servlet/jsp/JspApplicationContext.html" target="_top"><B>FRAMES</B></A> <A HREF="JspApplicationContext.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><font size="-1"><a href="http://java.sun.com/webapps/bugreport">Submit a bug or feature</a> <p>Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to <a href="../legal/license.html" target="_top">license terms.</a></font></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -