title: How to access a .properties file from my Java Web Service
body: <p>I have deployed my java web service successfully using tomcat. This web service is accessing a configuration file (.Properties) I have placed the config.properties files in the following directory </p>
  
  <pre><code>C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\ProcurementWS1\WEB-INF\classes\MainPackagePr
  </code></pre>
  
  <p>ProcurmentWS1 is the name of the WAR file</p>
  
  <p>this is how am trying to access it from my code:</p>
  
  <pre><code>Properties properties = new Properties();
              InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream("procwsconfig.properties");
              properties.load(is);
  </code></pre>
  
  <p>And am getting a null pointer exception on load</p>
  
  <p>can you tell me what am doing wrong?</p>