trying to write myself a grails plugin for
JSF.
but i'm having a problem
my plugin dir is like this
what i want to do, directly at the moment, in the plugin (havnt embedded in project yet ) is to store my jsf/index.xhtml in the normal grails-app/views dir (as you would a GSP) - however this is not in the web root of course
i've mucked around with my controllers/viewresolvers and view in grails mvc side and i have delegated the rendering to JSF like this
so i type into browser [plugin root]/jsf - this goes to the handler and fires the jsfController.index and returns a map
my viewresolver picks this up (i've gone round this
alot of times/ways now till i'm blue in the face ) and i'm tweaking view URI and get it all to work .
i also wrote a custom jsfResourceResolver to try and ask JSF to look outside its normal areas like this (i fiddle the basePath stub )
the latest try i tried to use was file:[path] like this - but this also fails to find it. my trace reads "couldnt find check grails-app : file:/grails-app/views/jsf/index.xhtml ", WARNING: JSF1064: Unable to find or serve resource, /grails-app/views/jsf/index.xhtml.
"
if i hack this so my url looks like "/jsf/index.xhtml" - it happily sorts itself and loads the index.xhtml in my top level web root. -- but thats not the one i want
this is all quite frustrating - if i want to keep the xhtml files in standard grails-app/views directory in plugin (or project incl the plugin) - what does the URL have to look like to locate the resource outside the web-app root directory.
how can i get the resource resolver to go back to [plugin]/grails-app/views and find the jsf/index.xhtml in that area
it would be easy if grails somehow published the grails-app/view directory internally into the web-app root - it must do that i guess but just cant figure out what that URL must be - either that or it somehow use spring resource loading to get from [plugin]/grails-app/views - but i just cant see how this trick is done
I need some help before i do my nut in ...