tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <>
Subject Re: Reuse JNDI Properties
Date Tue, 04 Dec 2012 13:33:17 GMT
2012/12/3 Christopher Schultz <>:
> On 12/3/12 8:03 AM, Martin Gamper wrote:
>> Hey everybody!
>> I am looking for a solution to reuse a JNDI Property which is set
>> in the context.xml : in my "${catalina.home}/conf/context.xml"
>> following <Environment name="nodeName" type="java.lang.String"
>> value="superFantasticNode" override="false" /> I use this value for
>> several different purposes.
>> Now I want to define (for my J2EE application) another value for
>> special Log- Files. And therefore I use another JNDI property ...
>> and in this Property I'd like to "reuse" the previously set
>> "nodeName"-variable.
>> In my Fantasy it would work like this: <Environment
>> name="loggingPath" value="${catalina.home}/logs/${nodeName}.log"
>> type="java.lang.String" override="false" />
>> But it does not.
> Tomcat has a very limited set of cases where ${...} will do
> replacements for system properties. I think it's definitely worth
> filing an enhancement request for this kind of thing: it's a *very*
> useful feature to have.

The ${...} handling can be extended by defining a class that
implements PropertySource interface,

BTW, in your case where you are specifying a global setting,
you can define nodeName property in conf/ file.

Best regards,
Konstantin Kolinko

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message