I am trying to understand when we access the following URL in tomcat who's responsible for serving the request:
http://localhost:8080
When we hit this URL, is this page served by the following servlet configured in the tomcat's web.xml configuration file:
<servlet>
<servlet-name>default</servlet-name>
<servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- The mapping for the default servlet -->
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
As can be seen, the URL pattern for which this default servlet gets invoked is "/", so is it this default servlet which caters this URL?
If the above is correct, I have this related question:
Usually we access any web application with its context root, so for the default servlet which is configured in the web.xml, what is the context root for default servlet?