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 47E781021A for ; Thu, 25 Apr 2013 17:53:36 +0000 (UTC) Received: (qmail 42968 invoked by uid 500); 25 Apr 2013 17:53:32 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 42908 invoked by uid 500); 25 Apr 2013 17:53:32 -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 42898 invoked by uid 99); 25 Apr 2013 17:53:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Apr 2013 17:53:32 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of Chuck.Caldarale@unisys.com designates 216.82.243.205 as permitted sender) Received: from [216.82.243.205] (HELO mail1.bemta8.messagelabs.com) (216.82.243.205) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Apr 2013 17:53:25 +0000 Received: from [216.82.241.132:25769] by server-13.bemta-8.messagelabs.com id BA/67-15464-08D69715; Thu, 25 Apr 2013 17:53:04 +0000 X-Env-Sender: Chuck.Caldarale@unisys.com X-Msg-Ref: server-8.tower-45.messagelabs.com!1366912382!31390478!4 X-Originating-IP: [192.61.61.104] X-StarScan-Received: X-StarScan-Version: 6.8.6.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 31238 invoked from network); 25 Apr 2013 17:53:03 -0000 Received: from unknown (HELO USEA-NAEDGE1.unisys.com) (192.61.61.104) by server-8.tower-45.messagelabs.com with RC4-SHA encrypted SMTP; 25 Apr 2013 17:53:03 -0000 Received: from usea-nahubcas2.na.uis.unisys.com (129.224.76.115) by USEA-NAEDGE1.unisys.com (192.61.61.104) with Microsoft SMTP Server (TLS) id 8.3.83.0; Thu, 25 Apr 2013 12:53:02 -0500 Received: from USEA-EXCH8.na.uis.unisys.com ([129.224.76.41]) by usea-nahubcas2.na.uis.unisys.com ([129.224.76.115]) with mapi; Thu, 25 Apr 2013 12:52:17 -0500 From: "Caldarale, Charles R" To: Tomcat Users List Date: Thu, 25 Apr 2013 12:52:16 -0500 Subject: RE: Question on servlet determination Thread-Topic: Question on servlet determination Thread-Index: Ac5B0+jumoBo5DKKRF2pNUW3TPNcZwACHAvQ Message-ID: <99C8B2929B39C24493377AC7A121E21FC4AC7868E9@USEA-EXCH8.na.uis.unisys.com> References: <7215BA462D00D343B2837F9113F0131F0146F225FA@POSTOFFICE02.polydyne.com> <99C8B2929B39C24493377AC7A121E21FC4AC51F84E@USEA-EXCH8.na.uis.unisys.com> <517814B5.6080102@christopherschultz.net> <51784211.6070408@christopherschultz.net> <51795CCE.3090008@christopherschultz.net> In-Reply-To: <51795CCE.3090008@christopherschultz.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org > From: Christopher Schultz [mailto:chris@christopherschultz.net]=20 > Subject: Re: Question on servlet determination > http://localhost:8080/examples/servlets/servlet/RequestInfoExample > I get the example page with pathInfo=3Dnull > http://localhost:8217/examples/servlets/servlet/RequestInfoExample/ > I also get the example page with pathInfo=3D/ > My question is why the top url (with no trailing /) is getting the > request at all, given the url-pattern in web.xml: > > RequestInfoExample > /servlets/servlet/RequestInfoExample/* > Likely because of these clauses in the spec: The container will recursively try to match the longest path-prefix. This is done by stepping down the path tree a directory at a time,=20 using the '/' character as a path separator. The longest match=20 determines the servlet selected. A string beginning with a '/' character and ending with a '/*' suffix is used for path mapping. (The above is from 3.0, section 12.1, rule 2, and section 12.2, first bulle= t.) But I haven't looked at the code to see how it's actually implemented. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MA= TERIAL and is thus for use only by the intended recipient. If you received = this in error, please contact the sender and delete the e-mail and its atta= chments from all computers. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org