This blog is shared between Linden and Rachel, who are cousins. The purpose of the blog is to share interesting information, links, and events. We share interests such as Apple Computers, Gaming, SciFi and Fantasy, computers in general, Programming (yay Python), websites and building them, and cool things in general.
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.
Take a look at this code in GroovyPagesGrailsPlugin:
ReplyDeletegroovyPagesTemplateEngine(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.