title: Grails render view from different plugin when deployed
body: <p>I have a problem, which only is an issue when my application is deployed - there is no issue when developing.</p>
  
  <p>I have 2 controlleres. One controller residing i a plugin which the second is extending. There exists a specific template in a view folder - <code>/templates/_mytemplate.gsp</code> in the "main" project -that is, not in the plugin.</p>
  
  <p>The "common-controller" has a method for rendering various templates based on a string. And this is where the trouble starts. Using:</p>
  
  <pre><code>String summary = groovyPageRenderer.render(template: "/mycontroller/templates/_mytemplates.gsp", model: [foo: bar])
  </code></pre>
  
  <p>Works perfectly fine in development but when war-deployed, the string is empty. I have narrowed the problem down to be of <code>resolveSearchPaths</code> method in <code>DefaultGroovyPageLocator</code> <a href="http://grails.org/doc/latest/api/org/codehaus/groovy/grails/web/pages/discovery/DefaultGroovyPageLocator.html" rel="nofollow">[1]</a> which differentiates the lookup path.</p>
  
  <p>Anyone? What would be reasonable solution? Preferable the templates are not located in the plugin....</p>