Home > Articles > Programming > Java

  • Print
  • + Share This
Like this article? We recommend


Spring uses a Front Controller like many of the other leading MVC architectures. The Front Controller in Spring is called DispatcherServlet and is declared in the web.xml file. In this example, Spring sets up the following declaration for the DispatcherServlet:


The file includes a basic reference to the servlet class and the configuration file for the servlet located in the /WEB-INF/spring/appServlet/ folder. Unlike other MVC architectures, Spring's dispatcher servlet has full access to the container (i.e., the Spring container)

The servlet-context.xml file contains the Bean properties for the beans that Spring uses to resolve view, locale, theme, and multi-part file resolvers. Most of the time, these beans and their properties are pre-configured for you with the necessary values.

  • + Share This
  • 🔖 Save To Your Account