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 699EE98DE for ; Tue, 25 Oct 2011 11:39:02 +0000 (UTC) Received: (qmail 28259 invoked by uid 500); 25 Oct 2011 11:38:59 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 28207 invoked by uid 500); 25 Oct 2011 11:38:59 -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 28198 invoked by uid 99); 25 Oct 2011 11:38:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Oct 2011 11:38:59 +0000 X-ASF-Spam-Status: No, hits=1.6 required=5.0 tests=RCVD_IN_BRBL_LASTEXT,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [79.34.33.2] (HELO elrond.aspix.it) (79.34.33.2) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Oct 2011 11:38:52 +0000 Received: from ithilien.local ([192.168.1.20] helo=shadowfax.local) by elrond.aspix.it with esmtp (Exim 4.69) (envelope-from ) id 1RIf79-0002D4-Qn for users@tomcat.apache.org; Tue, 25 Oct 2011 13:24:15 +0200 Message-ID: <4EA69FB5.8040408@aspix.it> Date: Tue, 25 Oct 2011 13:38:29 +0200 From: Edoardo Panfili User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: users@tomcat.apache.org Subject: Re: HOW TO detect what app server you're running in References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Il 25/10/11 13:33, Bob DeRemer ha scritto: > I may need to use some Tomcat-specific code in my web app. As a result, I would like to detect [if possible] when I'm running in Tomcat, so I can invoke the logic. If anyone knows how best to do this, ideally with some sample java code, that'd be great. > inside a servlet you can use this.getServletContext().getServerInfo(); Edoardo --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org