Understanding Spring MVC project setup
Flow Diagram of Spring MVC Img Source: TutorialsPoint Purpose of web.xml Until Spring 3.1 the only way to configure the DispatcherServlet was with the WEB-INF/web.xml file. servlet name is dispatcher an instance of DispatcherServlet Class Will be initialized with a parameter named contextConfigLocation which contains the path to the configuration XML load-on-startup is an integer value that specifies the order for multiple servlets to be loaded. So if you need to declare more than one servlet you can define in which order they will be initialized. Servlets marked with lower integers are loaded before servlets marked with higher integers. With the servlet mapping we are bounding it by its name to a URL pattern that specifies what HTTP requests will be handled by it. The listener ContextLoaderListener is used to create root WebApplicationContext Purpose of Servlet-Context.xml Component scanning with <context:component-scan base-package="co...