I know that in a standalone application I create one of the application context instances which in turn creates the beans from conf files. But I can not see any such code in dispatched servlet. How then are the beans created in a web application?
Share
The
ContextLoaderListenercreates anApplicationContext(by delegating toContextLoader) and stores it in the servlet context.So you have to map the
ContextLoaderListeneris a<listener>inweb.xmlThen, of course, that
ApplicationContext(WebApplicationContextin this case) creates the beans.