Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 19B3BF0C8 for ; Tue, 23 Apr 2013 15:54:11 +0000 (UTC) Received: (qmail 83591 invoked by uid 500); 23 Apr 2013 15:54:07 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 83519 invoked by uid 500); 23 Apr 2013 15:54:07 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 83510 invoked by uid 99); 23 Apr 2013 15:54:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Apr 2013 15:54:07 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of aw@ice-sa.com designates 212.85.38.228 as permitted sender) Received: from [212.85.38.228] (HELO tor.combios.es) (212.85.38.228) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Apr 2013 15:54:00 +0000 Received: from [192.168.245.129] (p508F6CA7.dip0.t-ipconnect.de [80.143.108.167]) (Authenticated sender: andre.warnier@ice-sa.com) by tor.combios.es (Postfix) with ESMTPA id BF23D3C0684 for ; Tue, 23 Apr 2013 17:54:04 +0200 (CEST) Message-ID: <5176AE82.6020706@ice-sa.com> Date: Tue, 23 Apr 2013 17:53:38 +0200 From: =?ISO-8859-1?Q?Andr=E9_Warnier?= Reply-To: Tomcat Users List User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: two responses from one request - how is it possible ? References: <51747E4B.9030508@ice-sa.com> <7215BA462D00D343B2837F9113F0131F0146F221C5@POSTOFFICE02.polydyne.com> <5175AE40.1020605@ice-sa.com> <7215BA462D00D343B2837F9113F0131F0146F224C8@POSTOFFICE02.polydyne.com> In-Reply-To: <7215BA462D00D343B2837F9113F0131F0146F224C8@POSTOFFICE02.polydyne.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Jeffrey Janner wrote: >> -----Original Message----- >> From: Andr� Warnier [mailto:aw@ice-sa.com] >> Sent: Monday, April 22, 2013 4:40 PM >> To: Tomcat Users List >> Subject: Re: two responses from one request - how is it possible ? >> >> Jeffrey Janner wrote: >> ... >> >>> In actuality, he should have stopped the first sentence at "Engine", >> and then continued with a new sentence (keeping in mind the simplified >> structure): >>> "The Engine will then see if the first string after the hostname >> portion >>> of the request URL matches any of the defined contexts. If a match >> is found, >>> then the request is passed to that context and the response is >> sent back >>> via the original connector. If a match is not found, then an >> error is returned." >> That is a big improvement over the original (which in my view is quite >> beyond redemption), but I believe that a better way would be to point >> the interested reader to chapter 12 of the Java Servlet Specification >> 3.0 ("Mapping Requests to Servlets"), which says it all (granted, in >> many more words). >> What is for example missing above are the concepts of, and mapping to, >> the "default context", servlets within a context, and "default >> servlet". >> > > Well, I was going to actually go into that depth, but decided to limit myself to their specific example. > I had thought of explaining how the engine picks the host, and the host picks the context, and the context picks the servlet, then thought I'd limit myself as they had limited themselves. > They only specified a single element with all default values, so I stuck to that example. > Well, I did not want Jakub to remain influenced by that very bad page, so I started along the same path as you did, and after writing half a page and getting into the details of how Tomcat matched the second and next components of the URL path to the elements of the selected context's web.xml, possibly ending up defaulting to the default servlet, which itself is defined in the default web.xml.. I decided that it was easier - and less prone to get a rebuff myself from Pid or so - to point to the servlet spec. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org