Java Doc for JspApplicationContext.java in  » EJB-Server-GlassFish » servlet » javax » servlet » jsp » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » EJB Server GlassFish » servlet » javax.servlet.jsp 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.servlet.jsp.JspApplicationContext

JspApplicationContext
public interface JspApplicationContext (Code)
Stores application-scoped information relevant to JSP containers.

The JSP container must create a single instance of JspApplicationContext for each ServletContext instance.

An instance of JspApplicationContext is obtained by invoking the static JspFactory.getJspApplicationContext method, passing the ServletContext of the corresponding web application.

The JspApplicationContext provides the following services to JSP applications:

  • Allows registration of ELResolvers, which are used to resolve variables in EL expressions contained in JSP pages and tag files.
  • Provides an instance of ExpressionFactory for those applications or frameworks that need to perform programmatic evaluation of EL expressions instead of allowing the JSP container to do it for them.
  • Allows the attachment of ELContextListener instances for notification whenever a new ELContext is created. This is necessary when an application wishes to make custom context objects available to their pluggable ELResolvers.


See Also:   javax.servlet.ServletContext
See Also:   JspFactory
See Also:   javax.el.ELResolver
See Also:   javax.el.ExpressionFactory
See Also:   javax.el.ELContextListener
since:
   JSP 2.1




Method Summary
public  voidaddELContextListener(ELContextListener listener)
     Registers a ELContextListeners 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 ELResolvers listed in JspApplicationContext.addELResolver . 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.

public  voidaddELResolver(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.

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.

public  ExpressionFactorygetExpressionFactory()
     Returns a factory used to create ValueExpressions and MethodExpressions so that EL expressions can be parsed and evaluated.



Method Detail
addELContextListener
public void addELContextListener(ELContextListener listener)(Code)
Registers a ELContextListeners 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 ELResolvers listed in JspApplicationContext.addELResolver . 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 ELResolvers in the stack to access the context they need when they do a resolution.


Parameters:
  listener - The listener to be notified when a newELContext is created.



addELResolver
public void addELResolver(ELResolver resolver)(Code)
Adds an 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:

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.

This restriction is in place to allow the JSP container to optimize for the common case where no additional ELResolvers are in the chain, aside from the standard ones. It is permissible to add ELResolvers 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.


Parameters:
  resolver - The new ELResolver
throws:
  IllegalStateException - if an attempt is made tocall this method after all ServletContextListenershave had their contextInitialized methods invoked.



getExpressionFactory
public ExpressionFactory getExpressionFactory()(Code)
Returns a factory used to create ValueExpressions and MethodExpressions so that EL expressions can be parsed and evaluated. A concrete implementation of thean ExpressionFactory.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.