Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 20906 invoked from network); 11 Oct 2009 13:10:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 Oct 2009 13:10:40 -0000 Received: (qmail 30436 invoked by uid 500); 11 Oct 2009 13:10:36 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 30359 invoked by uid 500); 11 Oct 2009 13:10:35 -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 30347 invoked by uid 99); 11 Oct 2009 13:10:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 11 Oct 2009 13:10:35 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of knst.kolinko@gmail.com designates 209.85.220.227 as permitted sender) Received: from [209.85.220.227] (HELO mail-fx0-f227.google.com) (209.85.220.227) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 11 Oct 2009 13:10:26 +0000 Received: by fxm27 with SMTP id 27so7002548fxm.41 for ; Sun, 11 Oct 2009 06:09:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=l5C/I+PWKi1D9FElL9JjBFE2b175J7Yg3ZMktdQU0Nc=; b=UAgs25QsyMMoEKUI41/uxcDsY5lT/S7bDIPfXhsaSZfV3eO8ecBcGcHhvt6dYmmdD6 tM57JdgrvsPNoIysuOep+zCK2OiEitQ6Ntf047R9AirrHjYLHVmgzvIViZhAeu4Q0CIi ZvooyUYbqNAmLcMfG3LICZFdd8kfr1FTX0F58= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=uGENxlvVH/kBI+pRYDY6hJPrtiaNgSlvhypTMEu/K4V1xN4Sd6rBArN+6AIgVXP0Il tq8IVSDJImXNyBitt1hY9u+Oaf7fzN7ezn7SGKzkA2sL3mRIORPdvRAqPNu8+RNZ8bzd t+g0YiLcDyh+E3SjUWhodJ+fQi663i9sHLVXQ= MIME-Version: 1.0 Received: by 10.103.80.20 with SMTP id h20mr1970720mul.21.1255266546472; Sun, 11 Oct 2009 06:09:06 -0700 (PDT) In-Reply-To: References: Date: Sun, 11 Oct 2009 17:09:06 +0400 Message-ID: <427155180910110609s268eaa8awd35a8d7d0672b5f1@mail.gmail.com> Subject: Re: Loading Jar files in a particular order on Tomcat 6 From: Konstantin Kolinko To: Tomcat Users List Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org One more way: You can use VirtualWebappLoader http://tomcat.apache.org/tomcat-6.0-doc/api/org/apache/catalina/loader/VirtualWebappLoader.html It adds the listed classpath entries to the webapp classloader. I do not know, whether it appends or prepends them, and as that is not documented it can be different between versions, but the following is certain: the libraries listed in virtualClasspath attribute are added in that very order with respect to each other. So, you can remove those conflicting libraries from WEB-INF/lib, e.g. move them to /WEB-INF/lib2, and add them in that particular order that you need. Note, that you can reference Java properties in any values in the context file. E.g. ${catalina.base}/webapps/myapp/WEB-INF/lib2/mylib.jar should work. Wildcards, e.g. *.jar, are not supported. The downside is that VirtualWebappLoader is not so widely used, and so there may be not so much experience with it, but you may give it a try. Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org