Skip to content

Instantly share code, notes, and snippets.

@prule
Last active December 17, 2015 00:49
Show Gist options
  • Save prule/5523793 to your computer and use it in GitHub Desktop.
Save prule/5523793 to your computer and use it in GitHub Desktop.
Tomcat context.xml sample showing database, mail server, and string properties definitions
<?xml version='1.0' encoding='utf-8'?>
<Context>
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<Resource name="jdbc/mydb" auth="Container" type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000"
username="sa" password="" driverClassName="org.h2.Driver"
url="jdbc:h2:tcp://localhost/~/test"/>
<Resource name="mail/session" auth="Container"
type="javax.mail.Session"
mail.smtp.host="localhost"
/>
<Environment name="ldap/host" value="localhost:10389" type="java.lang.String"/>
</Context>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment