I have a problem, which only is an issue when my application is deployed – there is no issue when developing.
I have 2 controlleres. One controller residing i a plugin which the second is extending. There exists a specific template in a view folder – /templates/_mytemplate.gsp in the “main” project -that is, not in the plugin.
The “common-controller” has a method for rendering various templates based on a string. And this is where the trouble starts. Using:
String summary = groovyPageRenderer.render(template: "/mycontroller/templates/_mytemplates.gsp", model: [foo: bar])
Works perfectly fine in development but when war-deployed, the string is empty. I have narrowed the problem down to be of resolveSearchPaths method in DefaultGroovyPageLocator [1] which differentiates the lookup path.
Anyone? What would be reasonable solution? Preferable the templates are not located in the plugin….
Stupid stupid stupid!
Developing on windows – deploying to Unix. So forgot a camelcase T <- which works on Windows not on Unix 🙂
So to make it work: