title: Loading .properties file in a jar from my web-app
body: <p>I have created a JAR that I need to use in my WEB-APP. Both are created with spring framework. I would like to load a .properties file outside the JAR file, in the main context of the web-application. And I want to do it with the facilities that Spring offers us.</p>
  
  <p>I've tried to do something like this in my spring.xml file inside the JAR:</p>
  
  <pre><code> &lt;bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"&gt;
      &lt;property name="location"&gt;
         &lt;value&gt;/WEB-INF/classes/my.properties&lt;/value&gt;
  &lt;/property&gt;
  &lt;/bean&gt;
  &lt;bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean"&gt;
     &lt;property name="triggers"&gt;
        &lt;bean id="cronTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean"&gt;
           &lt;property name="jobDetail" ref="myJob" /&gt;
       &lt;property name="cronExpression" value="${my.cronExpression}"/&gt;
        &lt;/bean&gt;
     &lt;/property&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>Trying to load my.cronExpression from my.properties file. But without any success.</p>
  
  <p>I always get this error:</p>
  
  <blockquote>
    <p>Could not resolve placeholder 'my.cronExpression'.</p>
  </blockquote>
  
  <p>I've tried to change the location with many variants, using classpath:/WEB-INF/classes/my.properties etc...</p>
  
  <p>But I'm not able to load the configuration file.</p>
  
  <p>Thanks for your help.</p>