Question: what is the difference between dispatcherservlet and contextloaderlistener in spring?
Answer: ContextLoaderListener creates root application context. DispatcherServlet entries create one child application context per servlet entry. Child contexts can access beans defined in root context. Beans in root context cannot access beans in child contexts (directly).