When a URL is hit, the web container first reads the deployment descriptor (web.xml) to determine how to route the request. The deployment descriptor contains servlet mappings, welcome file lists, and other routing rules. The servlet itself is invoked only after this mapping is resolved.