title: How to add external properties file to classpath in jboss 4.2
body: <p>I want to read an external properties file when launching Jboss 4.2 . I want to add it to the classpath to read it from a WAR file . I have seen different solutions with Jboss 6 using modules, but I haven't seen anything related to JBoss 4.2.</p>
  
  <p>I have included inside 'jboss-service.xml' the following code : </p>
  
  <pre><code>    &lt;!-- Bean for reading properties --&gt;
      &lt;mbean code="org.jboss.varia.property.SystemPropertiesService"      
       name="jboss.util:type=Service,name=SystemProperties"&gt;
       &lt;!-- Load properties from each of the given comma separated URLs --&gt;
       &lt;attribute name="URLList"&gt;
              ./conf/path.tmview.properties
       &lt;/attribute&gt;
      &lt;/mbean&gt;
  </code></pre>
  
  <p>In this file I have defined the property : </p>
  
  <pre><code>    property-placeholder filepath=/var/tmview_props/tmview/tmview.properties
  </code></pre>
  
  <p>This property is used in the following bean definition</p>
  
  <pre><code>   &lt;bean id="tmviewConfigurerLocation"   class="org.springframework.core.io.FileSystemResource"&gt;
        &lt;constructor-arg value="${property-placeholder-filepath}" /&gt;
     &lt;/bean&gt;
  </code></pre>
  
  <p>inside an applicationContext.xml . When I launch jboss, the file of properties is read</p>
  
  <pre><code>    15:45:29,939 INFO  [SystemPropertiesService] Loaded system properties   
      from: file:/D:/devel/projects/tmview/deployment/jboss-
      ...ver/tmview/conf/path.tmview.properties
  </code></pre>
  
  <p>So, the property is read, but I kept obtaining the following exception</p>
  
  <pre><code>    2015-03-24 15:45:39,219 ERROR    
      [org.springframework.web.context.ContextLoader] Context 
      initialization failed
      org.springframework.beans.factory.BeanInitializationException: Could   
      not load properties; nested exception is 
      java.io.FileNotFoundException: ${property-placeholder-filepath} (The 
      system cannot find the file specified)
      at   
      org.springframework.beans.factory.config.PropertyResourceConfigurer.
      postProcessBeanFactory(PropertyResourceConfigurer.java:78)
  </code></pre>
  
  <p>Is there any special way to read the property inside the spring bean ? </p>