I was confused like contextLoaderLister and ApplicationContext.xml files getting loaded as it is configured same way !
again thanks !
any good toutrial on spring , please let me know !
Yes and no. Sort of. Basically the DispatcherServlet creates an ApplicationContext, but really should only contain the beans for the Web Layer, no middle tier beans. So for the middle tier beans are loaded via the ContextLoaderListener which creates its own ApplicationContext.
So typically you end up with two ApplicationContexts. One for the middle tier and one for the web layer. Where the web layer beans can have the middle tier beans injected into them.