Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 57313 invoked from network); 9 Feb 2004 00:12:22 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 9 Feb 2004 00:12:22 -0000 Received: (qmail 90493 invoked by uid 500); 9 Feb 2004 00:12:03 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 90465 invoked by uid 500); 9 Feb 2004 00:12:03 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 34824 invoked from network); 8 Feb 2004 23:00:30 -0000 X-Originating-IP: [128.83.111.101] X-Originating-Email: [charles_crouch@hotmail.com] X-Sender: charles_crouch@hotmail.com Message-ID: <4026C0E6.8030104@hotmail.com> Date: Sun, 08 Feb 2004 17:06:14 -0600 From: Charles Crouch User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: commons-dev@jakarta.apache.org Subject: [configuration] referencing properties across files bug/feature? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 08 Feb 2004 23:00:37.0198 (UTC) FILETIME=[5D75CEE0:01C3EE97] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Thanks for the reply Eric. I read through http://jakarta.apache.org/commons/configuration/examples.html? but it didn't seem to address the variable interpolation/substitution issue that I described in my post below. I definitely need some sort of override behaviour but the examples say that the tags are optional, so I think the syntax of my propertiesConfiguration.xml is correct. I also got HEAD from cvs on Friday and ran my testcase again, still behaves as I described below. Any further thoughts about what I can do/look at? Thanks Charles ----------------------------------------------------------------------- From: Eric Pugh Subject: [configuration] referencing properties across files bug/feature? Date: Fri, 30 Jan 2004 19:31:38 +0100 Content-Type: text/plain; charset="iso-8859-1" Did you read the section here: http://jakarta.apache.org/commons/configuration/examples.html? The latest version has been reworked to make overrides simpler to do. Here is the guts: Notice the versus ? Also, check out one of the nightly builds from here: http://cvs.apache.org/builds/jakarta-commons/nightly/commons-configuration/. Eric > -----Original Message----- > From: Charles Crouch [mailto:charles_crouch@hotmail.com] > Sent: Friday, January 30, 2004 6:49 PM > To: commons-dev@jakarta.apache.org > Subject: [configuration] referencing properties across files > bug/feature? > > > Hello, > I have a question regarding referencing properties across different > property files. I've tried using both > commons-configuration-20030706.202021.jar and > commons-configuration-20040121.140929.jar. The setup I have is the > following: > > config-override.properties > baseURL=http://localhost:9080 > > config-default.properties > baseURL=http://localhost:80 > servletURL=${baseURL}/servlet > > propertiesConfiguration.xml > > className="org.apache.commons.configuration.PropertiesConfiguration" > fileName="config-override.properties"/> > className="org.apache.commons.configuration.PropertiesConfiguration" > fileName="config-default.properties"/> > > > > When I call configuration.getString("servletURL") I get > http://localhost:80/servlet, but what I want is > http://localhost:9080/servlet. > Is this a bug or a feature? Is there anyway I can achieve the > behavior > I'm after? > > Thanks very much. > Charles > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-dev-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org