Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 32842 invoked from network); 29 Sep 2008 11:33:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Sep 2008 11:33:11 -0000 Received: (qmail 58174 invoked by uid 500); 29 Sep 2008 11:32:58 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 58139 invoked by uid 500); 29 Sep 2008 11:32:58 -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 58128 invoked by uid 99); 29 Sep 2008 11:32:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Sep 2008 04:32:58 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [193.252.22.192] (HELO smtp6.freeserve.com) (193.252.22.192) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Sep 2008 11:31:57 +0000 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf3627.me.freeserve.com (SMTP Server) with ESMTP id 00E0C7000086 for ; Mon, 29 Sep 2008 13:32:20 +0200 (CEST) Received: from smtp.homeinbox.net (unknown [91.109.187.106]) by mwinf3627.me.freeserve.com (SMTP Server) with ESMTP id DF3BD7000085 for ; Mon, 29 Sep 2008 13:32:19 +0200 (CEST) X-ME-UUID: 20080929113219914.DF3BD7000085@mwinf3627.me.freeserve.com Received: from localhost (localhost [127.0.0.1]) by smtp.homeinbox.net (Postfix) with ESMTP id 3BC341A44B3 for ; Mon, 29 Sep 2008 12:32:14 +0100 (BST) X-Virus-Scanned: Debian amavisd-new at homeinbox.net Received: from smtp.homeinbox.net ([127.0.0.1]) by localhost (server01.dev.local [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id c3vX3GWHgnNe for ; Mon, 29 Sep 2008 12:32:08 +0100 (BST) Received: from [192.168.0.4] (study01.dev.local [192.168.0.4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.homeinbox.net (Postfix) with ESMTPSA id 41A451A44B0 for ; Mon, 29 Sep 2008 12:32:08 +0100 (BST) Message-ID: <48E0BCB3.8020006@apache.org> Date: Mon, 29 Sep 2008 12:32:03 +0100 From: Mark Thomas User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Sharing Application Code Between Contexts References: <4a12aaf80809290420o372ae14cs834245aa4c30d098@mail.gmail.com> In-Reply-To: <4a12aaf80809290420o372ae14cs834245aa4c30d098@mail.gmail.com> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Richard Sayre wrote: > Is it possible to have several contexts pointing to the same code > base? If I am hosing an application and other clients would like to > use it, is it possible to set them up a seprate context that points to > one set of JSP/Java Classes? Yes. How, depends on your Tomcat version. Look in the docs for shared classloader. > Are there disadvantages in doing this? Yes. Various class-loading issues. Any changes to the common code require a Tomcat restart. Potential incompatibility of dependencies. Disk is cheap. Memory is cheap. A simpler solution is to provide the code in a jar and let each web-app that wants to use it add that jar to WEB-INF lib. Mark --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org