Spring MVC Primer — Configuring a Spring MVC Application through web.xml (Part 2)
Introduction
In the previous article, we have introduced the MVC design pattern and provided an overview of Spring MVC and its various internal components. In this article, we will discuss configure a Spring MVC project
Tools and Technologies
Following tools and technologies are used to set up our Spring MVC project:-
- Spring Tool Suite (STS)
- Apache Tomcat
- Apache Maven
- Java 8
- JSP and JSTL
Configuring A Spring MVC project in STS
A Spring MVC application can be configured in several ways:-
- Configuring through classic web.xml
- Configuring through ServletContainerInitializer
- Configuring through AbstractAnnotationConfigDispatcherServletInitializer
In this article, we will discuss the first approach.
Note that we can set up a Spring MVC application in much faster and quickest way through Spring Boot. However, we won’t do that here.
Spring boot is a opinionated framework and it’s auto configuration defaults most of the…