Skip to content

Instantly share code, notes, and snippets.

@JacobASeverson
Last active December 30, 2015 18:19
Show Gist options
  • Save JacobASeverson/7866911 to your computer and use it in GitHub Desktop.
Save JacobASeverson/7866911 to your computer and use it in GitHub Desktop.
Gist for OPI Blog post "Grails Config Values Per Tomcat Host"
...
try {
exConfig = ((Context)(new InitialContext().lookup("java:comp/env"))).lookup("grailsExtConfFile")
} catch (Exception e) {
println("External configuration lookup failed: " + e)
}
grails.config.locations = ["${exConfig}"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment