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 647B510BEC for ; Fri, 22 Nov 2013 22:07:50 +0000 (UTC) Received: (qmail 46540 invoked by uid 500); 22 Nov 2013 22:07:47 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 46432 invoked by uid 500); 22 Nov 2013 22:07:47 -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 46423 invoked by uid 99); 22 Nov 2013 22:07:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Nov 2013 22:07:47 +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.207 as permitted sender) Received: from [216.82.243.207] (HELO mail1.bemta8.messagelabs.com) (216.82.243.207) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Nov 2013 22:07:39 +0000 Received: from [216.82.241.196:27897] by server-15.bemta-8.messagelabs.com id C9/01-03773-595DF825; Fri, 22 Nov 2013 22:07:17 +0000 X-Env-Sender: Chuck.Caldarale@unisys.com X-Msg-Ref: server-3.tower-46.messagelabs.com!1385158032!29610113!18 X-Originating-IP: [192.61.61.104] X-StarScan-Received: X-StarScan-Version: 6.9.13; banners=-,-,- X-VirusChecked: Checked Received: (qmail 3787 invoked from network); 22 Nov 2013 22:07:17 -0000 Received: from unknown (HELO USEA-NAEDGE1.unisys.com) (192.61.61.104) by server-3.tower-46.messagelabs.com with RC4-SHA encrypted SMTP; 22 Nov 2013 22:07:17 -0000 Received: from USEA-NAHUBCAS4.na.uis.unisys.com (129.224.76.29) by USEA-NAEDGE1.unisys.com (192.61.61.104) with Microsoft SMTP Server (TLS) id 8.3.327.1; Fri, 22 Nov 2013 16:07:02 -0600 Received: from USEA-EXCH8.na.uis.unisys.com ([129.224.76.41]) by USEA-NAHUBCAS4.na.uis.unisys.com ([129.224.76.29]) with mapi; Fri, 22 Nov 2013 16:07:02 -0600 From: "Caldarale, Charles R" To: Tomcat Users List Date: Fri, 22 Nov 2013 16:07:01 -0600 Subject: RE: parallel deployment question Thread-Topic: parallel deployment question Thread-Index: Ac7nzFoKia9T0pQ3TEGr4UDqs/LTBwAAhXTQ Message-ID: <99C8B2929B39C24493377AC7A121E21FC5CCA5D0E3@USEA-EXCH8.na.uis.unisys.com> References: In-Reply-To: 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: Leo Donahue - OETX [mailto:LeoDonahue@mail.maricopa.gov]=20 > Subject: parallel deployment question > When I parallel deploy demo##001.war, in my servlet, when I use: =20 > servletContext.getContextPath(); it prints: /demo > Why doesn't it print /demo##001 ? Because the context path is the same for all versions - that's the whole po= int. If the context path were different, the *client* would have to know t= hat to reach the new version. > If I do: servletContext.getRealPath(getServletName()); it prints: =20 > C:\ApacheTomcat\apache-tomcat-7.0.42\webapps\demo##001\servlet-mapping-na= me The getRealPath() API is an abomination and should never be used. Some ser= vlet deployments are on platforms without file systems, which is why it's a= llowed to return null. > I wanted to grab the demo##001 name and stick in the corner of my web=20 > apps running in development, so users can see which version is deployed. Your webapp should have a build or version number included as part of your = build mechanism. That number should not be associated with the deployment = mechanism. - 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