Wednesday, 1 April 2009

Modifying web.xml in Grails

I'm trying out Grails application hosting at with a free developer account. To put up a sample application, I wanted to be able to protect the site with basic authentication so that it won't be accidentally found and played with. So, following the instructions, I needed to modify web.xml to add security constraints and a login mechanism.

As with most things Grails, the solution was easy - simply install the templates and modify the web.xml template.

But, at the moment I have to uncomment it in order to get it running locally - what I really need is a way to only put this modification in when the environment is production...