In my project, we have a spring mvc application.
It has got both applicationcontext.xml as well as -servlet.xml config files.
Bean definitons are spread in both the files.
I want to know when we have -servlet.xml wats the need for applicationcontext.xml?
Please provide any explanation in this area.
What you refer as
applicationContext.xmlis the root application context (you put beans there when you need application-wide access to them) and what you refer as the[servlet]-context.xmlis a specific Spring Bean configuration xml for Spring MVC’sDispatcherServlet.