Servlet containers have rules for how they map and handle URI requests. These can be found in the Servlet Specification. It's also important to note that most Servlet containers have a
Servlet to handle JSPs, mapped to
*.jsp, which is an extension mapping. Tomcat has a
JspServlet to do this.
You've mapped your
which is a path mapping. Path mappings take precedence over extension mappings. So when you submit your view name
Spring will use the
to resolve a path to use with a
forward method. That path will be
/WEB-INF/views/index.jsp. Now the Servlet container will receive that path and attempt to find a
Servlet to handle it. Since you have a
Servlet mapped to
/* it will use it, but your
DispatcherServlet doesn't have a mapping for that path and therefore responds with a 404.
The simple solution is to change your mapping to
/, which is the default handler if no other matches are found. In this case, when you submit your view and the container must find a mapped
Servlet, it will find the
JspServlet and use it.