in the Web How to configure the environment (Web. xml) Applicationcontext.xml file
<listener>
<listener-class>
Org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
Or:
<servlet>
<servlet-name>context</servlet-name>
<servlet-class>
Org.springframework.web.context.ContextLoaderServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
Use the following method to remove the ApplicationContext instance :
ApplicationContext Ac=webapplicationcontextutils.getwebapplicationcontext (This.getservletcontext);
* How to add Spring Join Web in the container
Add the following in the Web. XML to load the contents of the/web-inf/applicationcontext.xml when you start the server.
<servlet>
<servlet-name>context</servlet-name>
<servlet-class>
Org.springframework.web.context.ContextLoaderServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
Get ApplicationContext instances with the following classes
Webapplicationcontextutils.getwebapplicationcontext
Applicationcontext.xml file configuration under Web environment