Use Application on JSP pages
You can see that the webapplicationcontextutils is used
Instead of Webapplicationcontext.root_web_application_context_attribute like
1. Get an instance of the IOC container from the application domain object
ApplicationContext context = webapplicationcontextutils.getwebapplicationcontext (application);
2. Getting beans from the IOC container
......
3. Using beans
.......
This is really strange, because in the Web. xml file I put the IOC container in the webapplicationcontext.root_web_application_context_attribute
Xml
Org.springframework.web.context.ContextLoaderListener: The Initwebapplicationcontext method is called in this class
Org.springframework.web.context.comntextLoader in this method, you can see that the context is put into the webapplicationcontext.root_web_ Application_context_attribute
However, you can see that the webapplicationcontextutils is used in the JSP page
After viewing the discovery returned is webapplicationcontext.root_web_application_context_attribute
Well, that's a match for our certification.
Spring uses ServletContext on JSP pages