commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Pugh" <ep...@upstate.com>
Subject RE: [configuration] referencing properties across files bug/feature?
Date Mon, 09 Feb 2004 08:48:02 GMT
Could you post a bug and attach your testcase?  Boil the testcase down to
the simplest possible, and we'll add it to the c-configuration test suite..

Eric

> -----Original Message-----
> From: Charles Crouch [mailto:charles_crouch@hotmail.com]
> Sent: Monday, February 09, 2004 12:06 AM
> To: commons-dev@jakarta.apache.org
> Subject: [configuration] referencing properties across files
> bug/feature?
>
>
> 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 <override> 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 <epugh@upstate.com>
> 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:
>
> <configuration>
>   <override>
>     <properties fileName="usergui.properties"/>
>     <dom4j fileName="gui.xml"/>
>   </override>
>
>   <additional>
>     <dom4j
> className="org.apache.commons.configuration.HierarchicalDOM4JC
> onfiguration"
>      fileName="tables.xml"/>
>     <dom4j
> className="org.apache.commons.configuration.HierarchicalDOM4JC
> onfiguration"
>      fileName="tasktables.xml" at="tables"/>
>   </additional>
> </configuration>
>
> Notice the <override> versus <additional>?
>
> Also, check out one of the nightly builds from here:
> http://cvs.apache.org/builds/jakarta-commons/nightly/commons-c
onfiguration/.

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
 >     <configuration>
 >       <properties
 > className="org.apache.commons.configuration.PropertiesConfiguration"
 > fileName="config-override.properties"/>
 >       <properties
 > className="org.apache.commons.configuration.PropertiesConfiguration"
 > fileName="config-default.properties"/>
 >     </configuration>
 >
 >
 > 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


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message