This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
When the servlet container gets a request URL: http://localhost/myapps/myservlet It first checks if myapps directory is present in webapps. if no matching directory, myservlet is assumed to be in a package called myapps in the default web application. Guys, please correct me if i'm wrong.
Actually I think that Tomcat does a scan of webapps when it first starts up, and checks each directory to see if it has a WEB-INF subdirectory with a web.xml descriptor. So when a request comes in, Tomcat already knows if there is a corresponding web application. During that initial scan Tomcat can locate and expand WAR files also. Bill