This problem is actual for me too, but this patch is not working properly if you deploy application from war under TomCat. I have tested it with apache-tomcat-5.5.20 and got the following errors:
Could not open ServletContext resource
[/WEB-INF/grails-app/views/plugins/test-plugin/grails-app/views//testview/_testTemaplate.gsp]
It was simple application which includes own plugins "test-plugin" where there is view templates "testTemaplate".
As you can see we have wrong path to a view template which placed into plugin. I have analyzed it and found that problem occurs here:
public Resource getResourceForUri(String uri) {
Resource r;
r = getResourceWithinContext(uri);
if(r == null || !r.exists()) {
String pluginUri = GrailsResourceUtils.WEB_INF + uri;
r = getResourceWithinContext(pluginUri);
if(r == null || !r.exists()) {
uri = getUriWithinGrailsViews(uri);
return getResourceWithinContext(uri);
}
}
return r;
}
After applying patch which has been attached to ticket, this method will be received uri = "plugin/test-plugin/....". And
String pluginUri = GrailsResourceUtils.WEB_INF + uri;
will be set to "/WEB-INFplugin/test-plugin/...."
I offer to other solution here: don't use this patch because, in really we have problems only when we include plugin inner resources (for example images or javascripts ) on the GSP.
<g:createLinkTo dir="${pluginContextPath}" file="js/mycode.js" />
Thus will be good to implement changes only in the createLinkTo tag.
As temporary solution can be used:
<g:createLinkTo dir="${pluginContextPath?.substring(1)}" file="js/mycode.js" />
For the first problem see also JETTY-386. But the fix should be in Grails, as double slashes are not really valid anyway.