01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package javax.servlet.jsp;
18:
19: import javax.el.ELContextListener;
20: import javax.el.ELResolver;
21: import javax.el.ExpressionFactory;
22:
23: /**
24: * <p>
25: * Stores <i>application</i>-scoped information for the JSP container.
26: * </p>
27: * @since 2.1
28: */
29: public interface JspApplicationContext {
30:
31: /**
32: * <p>
33: * Registers an <code>ELContextListener</code> that will notified whenever
34: * a new <code>ELContext</code> is created.
35: * </p>
36: * <p>
37: * At the very least, any <code>ELContext</code> instantiated will have reference
38: * to the <code>JspContext</code> under <code>JspContext.class</code>.
39: * </p>
40: *
41: * @param listener
42: */
43: public void addELContextListener(ELContextListener listener);
44:
45: /**
46: * <p>
47: * Adds an <code>ELResolver</code> to the chain of EL variable and property management
48: * within JSP pages and Tag files.
49: * </p>
50: * <p>
51: * JSP has a default set of ELResolvers to chain for all EL evaluation:
52: * <ul>
53: * <li><code>ImplicitObjectELResolver</code></li>
54: * <li><code>ELResolver</code> instances registered with this method</li>
55: * <li><code>MapELResolver</code></li>
56: * <li><code>ListELResolver</code></li>
57: * <li><code>ArrayELResolver</code></li>
58: * <li><code>BeanELResolver</code></li>
59: * <li><code>ScopedAttributeELResolver</code></li>
60: * </ul>
61: * </p>
62: *
63: * @param resolver an additional resolver
64: * @throws IllegalStateException if called after the application's <code>ServletContextListeners</code> have been initialized.
65: */
66: public void addELResolver(ELResolver resolver)
67: throws IllegalStateException;
68:
69: /**
70: * <p>
71: * Returns the JSP container's <code>ExpressionFactory</code> implementation for EL use.
72: * </p>
73: *
74: * @return an <code>ExpressionFactory</code> implementation
75: */
76: public ExpressionFactory getExpressionFactory();
77:
78: }
|