Sunday, April 15, 2012

Using the Root Application Context ('/') in Grails

Hi all,

Its been a long time since I posted on this blog (since June of last year!) but as I was trying to remember how I did something only a week ago I was reminded of why posting to this blog is useful - for me at least!

To get you up to speed, I have been investigating and enjoying Grails, a 'rails-like' web application platform built on Groovy and Java. 'Rails-like' is best mentioned in quotes because a lot of Grails fans will tell you that the similarity is only skin-deep. I don't know Ruby on Rails well enough to comment (oh but how many create-a-blog tutorials have I done?) but I am surprised by how deep Grails is.

In any case, the nugget of information I would like to share today is how to get Grails 2.* to publish to root context. By convention Grails will publish to an application context the same as or derived from your application name. When running the local development server this would mean your application would be hosted at and below http://localhost:8080/myapp/.

To publish to the root application context you can add the following line to your conf/Config.groovy file: = '/'

Pretty simple. My understanding on J2EE application contexts pretty limited but the above setting can be overridden during the deployment anyway (Heroku, which provides hosting for Grails amongst other platforms, does this).


  1. I ordered a replica watch here.Replica Breitling Watches UK When I received the watch, it surprised me very much. This watch is perfect and the quality is exactly the same as the real watch.replica Breitling colt A dazzling masonry. I introduced this website to my friends, and my friends liked it very much.


  2. This is a powerful archive tool that lets you open, create, and manage archive files.
    Supports all file formats including zip, 7z, ISO, and other common formats. OneArchiver can add an exported file to a virtual drive.
    WinArchiver Virtual Drive Crack is a free virtual CD / DVD ROM tool. It can include all popular CD / DVD image files as well as all popular files.
    Without the original CD / DVD, you can play programs and access files from virtual drives.
    Virtual drives run 200 times faster than traditional CD / DVD ROM drives.
    Download it free from here: