title: load properties files outside war with Spring on tomcat
body: <p>I have a war file that will be deployed on many clients. I just want to change the configurations on <code>database.properties</code> file without generating a new build.</p>
  
  <p>Using the code below on my <code>applicationContext.xml</code> spring configuration file I achieved the expected result from a jar file, </p>
  
  <pre><code>&lt;bean id="propertyConfig" class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer"&gt;
        &lt;property name="locations"&gt;
            &lt;list&gt;
                &lt;value&gt;classpath:META-INF/spring/*.properties&lt;/value&gt;
                &lt;value&gt;file:./database.properties&lt;/value&gt;
            &lt;/list&gt;
        &lt;/property&gt;
        &lt;!--If false (default) then config file ("resource") must exist or exception is thrown.
            Set to true if the config file is optional--&gt;
        &lt;property name="ignoreResourceNotFound" value="true"/&gt;
        &lt;!--If false (default) then if placeholder fails to resolve throw exception--&gt;
        &lt;property name="ignoreUnresolvablePlaceholders" value="true"/&gt;
  &lt;/bean&gt; 
  </code></pre>
  
  <p>and now I just want to deploy my war on tomcat7 and let the application search for the external property file with my database settings on the same directory where my .war is deployed, on the client machine without need the full tomcat directory path. like I realized before to the jar.  </p>
  
  <p>What I have to do?</p>