I want to know programmatically if a view or a layout exists in grails.
I am thinking in obtain the absolutepath and ask for File.exists but I don\'t know how to obt
Since Grails 2.0, you can inject a GrailsConventionGroovyPageLocator:
GrailsConventionGroovyPageLocator groovyPageLocator
and call
groovyPageLocator.findViewByPath(...) groovyPageLocator.findTemplateByPath(...)
to check if views or templates exist.