How to map the welcome file to a servlet?

In a Java web application, assume you have a project structure like this:

Setting up JPA on a Java Web App with MySQL deployed on Tomcat using IntelliJ as IDE with maven build.

In this post I will try to explain how JPA can be set up.