title: Get the path a propertie file in the maven resource directory src/main/resouces
body: <p>i want to read from my propertie file in the maven resource directory (src/main/resouces).
  The path to the propertie file is called: <code>src/main/resouces/jsfatwork/messages</code></p>
  
  <p>The file is called test.properties.
  I used JSF 2.2, Eclipse, Java Web Project
  The webapp runs on a Tomcat 7</p>
  
  <p>I write in the maven pom.xml file:</p>
  
  <pre><code>&lt;resources&gt;
      &lt;resource&gt;
       &lt;directory&gt;${basedir}/src/main/resouces/jsfatwork/messages&lt;/directory&gt;
          &lt;include&gt;**/test.properties&lt;/include&gt;
       &lt;/resource&gt;
   &lt;/resources&gt;
  </code></pre>
  
  <p>And write in my java file:
  Properties prop= new Properties();</p>
  
  <pre><code>Properties properties = new Properties();
  try {
  //load a properties file
  properties.load(Thread.currentThread().getContextClassLoader().getResourceAsStream("test.properties"));         
         } catch(Exception e) {
              }
  </code></pre>
  
  <p>But it don't find the propertie file.
  Can i read out the path how is find in the <code>Thread.currentThread().getContextClassLoader().getResourceAsStream</code>?</p>