Skip to content

Instantly share code, notes, and snippets.

@jurberg
Created January 24, 2013 04:02
Show Gist options
  • Save jurberg/4617534 to your computer and use it in GitHub Desktop.
Save jurberg/4617534 to your computer and use it in GitHub Desktop.
Adding a context-param to the beginning a Grails app web.xml
eventWebXmlEnd = { String tmpfile ->
def contextParam = '''<context-param>
<description>Spring Expression Language Support</description>
<param-name>springJspExpressionSupport</param-name>
<param-value>false</param-value>
</context-param>'''
def root = new XmlParser().parse(webXmlFile)
root.children().add(0, new XmlParser().parseText(contextParam))
new XmlNodePrinter(new PrintWriter(new FileWriter(webXmlFile))).print(root)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment