2012/12/3 Christopher Schultz <ch...@christopherschultz.net>: > 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, http://tomcat.apache.org/tomcat-7.0-doc/config/systemprops.html BTW, in your case where you are specifying a global setting, you can define nodeName property in conf/catalina.properties file. Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org