title: Spring 3.0 Could not load properties
body: <p>Im the getting the following Error/exception when deploying web app:</p>
  
  <blockquote>
    <p>org.springframework.beans.factory.BeanInitializationException: Could
    not load properties; nested exception is
    java.io.FileNotFoundException: Could not open ServletContext resource
    [/WEB-INF/WebAppProps]</p>
  </blockquote>
  
  <p>Below is the context tag that Im using in <strong>applicationContext.xml</strong> to point to <strong>WebAppsProps.properties</strong> file</p>
  
  <pre><code>   &lt;bean id="propertyConfigurer"
      class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
      p:location="classpath:/WEB-INF/WebAppProps.properties" /&gt;
  </code></pre>
  
  <p><strong>I have also used:</strong> </p>
  
  <pre><code>  &lt;bean id="propertyConfigurer"
      class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
      p:location="/WEB-INF/WebAppProps.properties" /&gt;
  </code></pre>
  
  <p>The file is actualy in the filesystem &amp; below is the snapshot of my project structure: </p>
  
  <p><img src="https://i.stack.imgur.com/mEYdh.png" alt="enter image description here"></p>
  
  <p>I also tried , putting "WebAppProps.properties" on the classpath and used these 2 variations</p>
  
  <p><strong>variation 1:</strong> </p>
  
  <pre><code>&lt;bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"&gt; 
          &lt;property name="location"&gt; 
              &lt;value&gt;classpath:WebAppProps.properties&lt;/value&gt; 
          &lt;/property&gt; 
      &lt;/bean&gt; 
  </code></pre>
  
  <p><strong>variation 2:</strong></p>
  
  <pre><code>&lt;bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"&gt; 
          &lt;property name="location"&gt; 
              &lt;value&gt;WebAppProps.properties&lt;/value&gt; 
          &lt;/property&gt; 
      &lt;/bean&gt; 
  </code></pre>
  
  <p>Please see below: 
  <img src="https://i.stack.imgur.com/vwQyZ.png" alt="enter image description here"></p>
  
  <p>However Im still getting same error/exception.</p>
  
  <p>Please Advise</p>
  
  <p>Thank you </p>