title: How to load properties file in Google App Engine?
body: <p>So I'm trying to add some ability to my project to allow user-defined properties in my deployment artifact - a simple key:value .properties file.  I place the service.properties file in </p>
  
  <pre><code>war/WEB-INF/my-service.properties 
  </code></pre>
  
  <p>And in my ServiceImpl.java constructor I have the following: </p>
  
  <pre><code>String propertiesFileName = "my-service.properties"; 
  
  URL propertyURL = ClassLoader.getSystemResource(propertiesFileName);
  URL propertyURL2 = this.getClass().getClassLoader().getResource(propertiesFileName);
  URL propertyURL3 = this.getClass().getClassLoader().getResource( "WEB-INF/" + propertiesFileName);
  URL propertyURL6 = this.getClass().getClassLoader().getResource(
         "E:/Projects/eclipse-workspace/projectName/war/WEB-INF/" + propertiesFileName);
  </code></pre>
  
  <p>All instances of Property URL are null.  I know I'm missing something absolutely obvious, but I need a second pair of eyes.  Regards.</p>
  
  <p>EDIT: </p>
  
  <p>Ah, it seems I was confused as the default GAE project creates a logging.properties file in /war.  From the <a href="http://code.google.com/appengine/docs/java/runtime.html#Logging" rel="noreferrer">Google App Engine documentation:</a></p>
  
  <p><i>The App Engine Java SDK includes a template logging.properties file, in the appengine-java-sdk/config/user/ directory. To use it, copy the file to your WEB-INF/classes directory (or elsewhere in the WAR), then the system property java.util.logging.config.file to "WEB-INF/classes/logging.properties" (or whichever path you choose, relative to the application root). You can set system properties in the appengine-web.xml file, as follows:
  </i></p>