See: http://www.cnblogs.com/isisbenben/p/5594323.html
What's the difference between ServletContext and ApplicationContext?
ServletContext: is a web container of things, a webapp, more than the scope of the session to get a lot of information, such as: The path directory of the project deployment.
ApplicationContext: Spring is something that spring uses to read the XML configuration file to the new bean (application context)
Role: (1) Read Bean configuration file, manage bean load, instantiate, maintain dependency between beans, responsible for bean's periodic declaration
(2) Provide complete framework functions such as: A. Internationalization Support B. Resource access: Resource RS =ctx.getresource ("classpath:config.properties"); C. Event delivery: By implementing the Applicationcontextaware interface.
======== =========================================================================================
Similarities and differences of ServletContext and application
The two are essentially the same, equivalent to creating 2 different names of variables.
ServletContext is the Application object in the servlet:
ServletContext application =null;
Application =pagecontext.getservletcontext ();
Difference:
The difference between the two is that application is used in JSPs, and ServletContext is used in Servlets. Application and page, request, session are the built-in objects in JSP, the property data stored in the background with ServletContext can be obtained by Application object.
ServletContext and ApplicationContext in the Web