Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 56304 invoked by uid 500); 1 Aug 2001 08:16:19 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk Reply-To: tomcat-user@jakarta.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 56289 invoked from network); 1 Aug 2001 08:16:18 -0000 Received: from mout02.kundenserver.de (195.20.224.133) by h31.sny.collab.net with SMTP; 1 Aug 2001 08:16:18 -0000 Received: from [195.20.224.148] (helo=mxintern.kundenserver.de) by mout02.kundenserver.de with esmtp (Exim 2.12 #2) id 15RrAy-0005dc-00 for tomcat-user@jakarta.apache.org; Wed, 1 Aug 2001 10:16:20 +0200 Received: from wizard.schlund.de ([172.17.0.16] helo=schlund.de) by mxintern.kundenserver.de with esmtp (Exim 2.12 #3) id 15RrAy-0005SC-00 for tomcat-user@jakarta.apache.org; Wed, 1 Aug 2001 10:16:20 +0200 Sender: bk Message-ID: <3B67BAD3.DED4FC15@schlund.de> Date: Wed, 01 Aug 2001 10:16:19 +0200 From: Bernd Koecke Organization: Schlund+Partner X-Mailer: Mozilla 4.74 [de] (X11; U; Linux 2.2.16 i686) X-Accept-Language: de, en MIME-Version: 1.0 To: tomcat-user@jakarta.apache.org Subject: Re: How to get everyone to use one config References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Brandon Cruz wrote: > > I have a system set up on tomcat 3.2.1, linux, apache... > > I have several virtual hosts that are all using the same web application. > This application consists of a bunch of class files that are stored in > $tomcat_home$/classes and packages stored in $tomcat_home$/lib. I would > like to be able to set up things in web.xml such as custom error pages and > the like. Is there a way I can make all these hosts use the same error > pages? I don't care if it looks the same across all sites when an error > pops up. You could use a symlink for this page, but then you have to write the same text in all the web.xml-files. But you can write your own ContextInterceptor and place it after the WebXmlReader. Then you can configure your Interceptor to add the same error page to all or a group of contexts. > > On another note, what if I decide that I want to create a custom web > application for just one of my virtual hosts? Is this possible? Can I just > create it as I normally would for a web application? If I have classes with > the same name, will it find the ones in tomcat_home/classes or > web-inf/classes first? Yes its possible. Normally the Contexts are separated by each other. Every Context gets his own ClassLoader which has the ClassLoader of Tomcat as parent. The servlet is loaded by the classloader of the context. So any class in your Servlet will ask the servlet classloader first and this will call the parent classloader in a second try. So you have to be carefull with new versions of your webapp. Otherwise you could get errors like the foks with two parser in their classpath. [...] Hope this helps :) Bernd -- Dipl.-Inform. Bernd Koecke UNIX-Entwicklung Schlund+Partner AG Fon: +49-721-91374-0 E-Mail: bk@schlund.de