ServletContext is used to store global application attributes among other things,e.g In grails controller we can store global application attribute as :

def mySetting = servletContext["mySetting"]

servletContext["mySetting"] = "foo"

asset "foo" == servletContext.mySetting

But what If I need “mySetting” property in grails gsp page, we can achieve this as:

${application["mySetting"]}

Where application is of type ServletContext