Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 4901 invoked from network); 3 May 2007 07:12:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 May 2007 07:12:59 -0000 Received: (qmail 7213 invoked by uid 500); 3 May 2007 07:13:03 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 6736 invoked by uid 500); 3 May 2007 07:13:01 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 6725 invoked by uid 99); 3 May 2007 07:13:01 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 May 2007 00:13:01 -0700 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [193.74.65.221] (HELO linux.easyhost.be) (193.74.65.221) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 May 2007 00:12:53 -0700 Received: (qmail 13745 invoked from network); 3 May 2007 09:12:26 +0200 Received: from localhost (127.0.0.1) by localhost with SMTP; 3 May 2007 09:12:26 +0200 Received: from sg1.iba.be (sg1.iba.be [213.251.66.141]) by webmail.daune-consult.com (Horde MIME library) with HTTP; Thu, 3 May 2007 09:12:26 +0200 Message-ID: <20070503091226.ipvmxz73edesw4wk@webmail.daune-consult.com> Date: Thu, 3 May 2007 09:12:26 +0200 From: daune.jf@daune-consult.com To: commons-user@jakarta.apache.org Subject: Re: [Configuration] J2EE file mapping References: <20070502152932.uh4ne9sdlpwc804k@webmail.daune-consult.com> <4638EC7C.7010308@oliver-heger.de> In-Reply-To: <4638EC7C.7010308@oliver-heger.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.1.3) X-Virus-Checked: Checked by ClamAV on apache.org Quoting Oliver Heger : > daune.jf@daune-consult.com wrote: >> Hi, >> >> I would like to use DefaultConfigurationBuilder in a servlet, but =20 >> it cannot properly handle a property file, as only =20 >> has 'fileName' tag. >> >> There is no way to pass it a URL instead. >> >> Any idea about this? >> >> Cheers, >> >> J-F >> >> > The fileName attribute should also accept full path names and URLs. The > internal mechanism for locating configuration files checks for all > these possibilities. > > BTW: the attributes are directly mapped to properties (i.e. setXXX > methods) of the configuration classes to be created. So you could also > use other properties available in PropertiesConfiguration or its base > classes. > > Oliver > This is not what I observe. And this is not what I read from code. By debugging, I see that ConfigurationUtils.locate(String, String) is =20 called with the builder config file as base resource (from =20 AbstractFileConfiguration). So, if the builder config file is 'config.xml', and that file contains =20 , ConfigurationUtils =20 attempts to concatenate 'config.xml' and 'jndi:/bla bla bla', ending =20 up with malformed URL. The attribute 'fileName' is really for files. The attribute 'url' does not work. It must be 'URL' in uppercase. Not =20 easy to find out, especially with UltraEdit automatically rlling back =20 to lowercase. J-F --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org