In this session, we will create our first servlet. To keep things simple, it will just output “Hello, world” type string. In the following sections of the tutorial, we will dig deeper into servlet API.
First order of business is to add Servlet API dependency to our project's pom.xml. Add the following code snippet to pom.xml.