Friday, February 29, 2008

Gotcha: Grails Auto Recompile Doesn't Do GSP

Grails does the auto recompile thing, much like Turbogears etc., but it doesn't seem to work for gsp pages, in particular, main.gsp. Which can trip you up, if you're trying to make a couple simple changes to your first Grails app.

1 comment:

Anonymous said...

Take a look at this code in GroovyPagesGrailsPlugin:

groovyPagesTemplateEngine(org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateEngine) {

classLoader = ref("classLoader")

if (developmentMode) {

resourceLoader = groovyPageResourceLoader

}

if (grails.util.GrailsUtil.isDevelopmentEnv() || application.config.grails.gsp.enable.reload == true) {

reloadEnabled = true

}

tagLibraryLookup = gspTagLibraryLookup

jspTagLibraryResolver = jspTagLibraryResolver

}

So, you have to set the enviroment to be in 'development' mode.