The UrBlog

John's Ramblings about Software Development

Add a Context-param to Grails

With the recent Spring vulnerability, we thought it would be a good idea to disable EL in our Grails application. To do this, we need to add a context-param to the beginning of the generated web.xml file. Rather than using install-templates, I used the eventWebXmlEnd event to insert it. XMLSlurper would have been nice, but it does not have a simple way to insert a node at the beginning. So instead I used the XmlParser and came up with the following.

Comments