commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "DiFrango, Ronald (CONT)" <Ronald.DiFra...@capitalone.com>
Subject Commons Config: Variable Interpolation
Date Fri, 11 Jul 2014 14:49:03 GMT
I'm attempting to perform Variable Interpolation as outlined here:

http://commons.apache.org/proper/commons-configuration/userguide/howto_basicfeatures.html#Variable_Interpolation

I'm using an XML file as the starter so I added the following blurb to the beginning of the
file:

<header>
              <result />
              <lookups>
                     <lookup config-prefix="expr"
                           config-class="org.apache.commons.configuration.interpol.ExprLookup">
                           <variables>
                                  <variable name="net" value="Class:java.net.InetAddress"
/>
                           </variables>
                     </lookup>
              </lookups>
       </header>

And then in my properties file that is loaded I did:

mobile.rest.host=${expr:$[net.localHost.hostName]}

But it did not work any thoughts on what I'm doing wrong?

Thanks,

Ron


________________________________________________________

The information contained in this e-mail is confidential and/or proprietary to Capital One
and/or its affiliates. The information transmitted herewith is intended only for use by the
individual or entity to which it is addressed.  If the reader of this message is not the intended
recipient, you are hereby notified that any review, retransmission, dissemination, distribution,
copying or other use of, or taking of any action in reliance upon this information is strictly
prohibited. If you have received this communication in error, please contact the sender and
delete the material from your computer.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message