title: Externalize Tomcat configuration
body: <p>I have a DataSource configuration in context.xml. Is it possible not to hard-code database parameters in that file? For example, use an external properties file, and load the parameters from it?</p>
  
  <p>Something, like this:</p>
  
  <p>context.xml:</p>
  
  <pre><code>  &lt;Resource
    name="jdbc/myDS" auth="Container"
    type="javax.sql.DataSource"
    driverClassName="oracle.jdbc.OracleDriver"
    url="${db.url}"
    username="${db.user}"
    password="${db.pwd}"
    maxActive="2"
    maxIdle="2"
    maxWait="-1"/&gt;
  </code></pre>
  
  <p>db.properties:</p>
  
  <pre><code>db.url=jdbc:oracle:thin:@server:1521:sid
  db.user=test
  db.pwd=test
  </code></pre>