Spring MVC Primer — Configuring a Spring MVC Application through web.xml (Part 2)

Somnath Musib
Code Fountain
Published in
5 min readOct 28, 2019

--

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:-

  1. Spring Tool Suite (STS)
  2. Apache Tomcat
  3. Apache Maven
  4. Java 8
  5. JSP and JSTL

Configuring A Spring MVC project in STS

A Spring MVC application can be configured in several ways:-

  1. Configuring through classic web.xml
  2. Configuring through ServletContainerInitializer
  3. 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…

--

--

Somnath Musib
Code Fountain

4X AWS | Staff Software Engineer, Cloud Architect | Author "Spring Boot In Practice" | Find more at https://musibs.github.io