From users-return-185088-apmail-tomcat-users-archive=tomcat.apache.org@tomcat.apache.org Wed Sep 10 01:40:59 2008 Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 20850 invoked from network); 10 Sep 2008 01:40:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Sep 2008 01:40:58 -0000 Received: (qmail 53189 invoked by uid 500); 10 Sep 2008 01:40:43 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 53155 invoked by uid 500); 10 Sep 2008 01:40:43 -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 53138 invoked by uid 99); 10 Sep 2008 01:40:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Sep 2008 18:40:43 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jordan@viviotech.net designates 208.77.208.8 as permitted sender) Received: from [208.77.208.8] (HELO birch.viviotech.net) (208.77.208.8) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Sep 2008 01:39:43 +0000 Received: (qmail 18457 invoked from network); 10 Sep 2008 01:40:13 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on birch.viviotech.net X-Spam-Level: Received: from unknown (HELO ?192.168.0.217?) (jordan@viviotech.net@208.77.208.186) by birch.viviotech.net with SMTP; 10 Sep 2008 01:40:13 -0000 Message-ID: <48C725EB.7040808@viviotech.net> Date: Tue, 09 Sep 2008 18:42:03 -0700 From: Jordan Michaels User-Agent: Thunderbird 2.0.0.16 (X11/20080724) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: relative paths in web.xml References: <48C70B1D.2020907@viviotech.net> In-Reply-To: X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Status: CLEAN X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-4.5 required=5.0 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.4 Hmm... I tried this, and it looks as though Tomcat still pre-pends the "/home/myuser/public_html/" to my XML file. My servlet throws the error: java.io.FileNotFoundException: /home/myuser/public_html/path/to/tomcat/conf/myservlet/myxmlfile.xml and my file is really located at: /path/to/tomcat/conf/myservlet/myxmlfile.xml I have multiple sites that need to have access to this same servlet with the same XML file passed to it, and it would be great if I didn't have to copy this file to each site for each HOST entry... IE: The way Tomcat is working now, I would have to copy that XML file that I need to pass to the servlet to each user's "public_html" directory in order for the servlet to use it (which would also make the file web-accessible - not at all what I want). Is there a way to tell Tomcat to not use the docbase when passing this file to the servlet? Thanks to all of you who responded both on-list and off. =) I really appreciate your help! Warm regards, Jordan Michaels Vivio Technologies http://www.viviotech.net/ Open BlueDragon Steering Committee Adobe Solution Provider Bill Barker wrote: > "Jordan Michaels" wrote in message > news:48C70B1D.2020907@viviotech.net... >> I'm trying to set up a "init-param" in Tomcat's main web.xml file (the >> one in $CATALINA_HOME/conf/web.xml) that looks similar to the following: >> >> >> myServlet >> path.to.my.Servlet >> >> SOME_XML_FILE >> ./conf/myservlet/myxmlfile.xml >> >> 0 >> >> >> and in my $CATALINA_HOME/conf/server.xml file, I have the following: >> >> > unpackWARs="true" autoDeploy="true" >> xmlValidation="false" xmlNamespaceAware="false"> >> >> >> >> My XML file is in $CATALINA_HOME/conf/myservlet/myxmlfile.xml, but >> whenever I load this up, Tomcat looks for the file under the >> /home/myuser/public_html/ folder. >> >> Is there a way that I can tell tomcat to look for a file that's relative >> to the $CATALINA_HOME folder instead of my Context Docbase value? It >> would be ideal if the Param-Value had no relation to the Context Docbase >> value at all. >> >> Is this even possible with Tomcat? >> > > This feature is specific to Tomcat, but yes you can do it. You would use: > ${catalina.home}/conf/myservlet/myxmlfile.xml > > When Tomcat parses your web.xml file, it will substitute the value for the > System property catalina.home. Of course, this works for any System > property. > > >> Thanks in advance for any help anyone can offer. >> >> -- >> Warm regards, >> Jordan Michaels >> Vivio Technologies >> http://www.viviotech.net/ >> Open BlueDragon Steering Committee >> Adobe Solution Provider >> >> --------------------------------------------------------------------- >> 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 >> >> > > > > > --------------------------------------------------------------------- > 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 > > --------------------------------------------------------------------- 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