On Jan 19, 2008 11:20 AM, Peter Svensson <[EMAIL PROTECTED]> wrote: > ...Whatever url I access I get this; > > ** Node dumped by PlainTextRendererServlet**...
This means that microsling-core didn't find a specific script to process the Resource. > ...** Node properties ** > jcr:created: 2008-01-18T02:47:25.953Z > jcr:primaryType: nt:folder... Your node doesn't have a sling:resourceType property, so microsling-core will look for scripts based on the node type. If vou have created the /bunkai node via WebDAV, its node type is most probably nt:folder (or maybe nt:file), as opposed to nt:unstructured if you had created it using the content-creation test form (but in the latter case you can set the sling:resourceType so the node type wouldn't matter for script resolution). The script resolution rules in microsling-core are as follows (and we're missing good log messages ATM to follow them live - a java debugger would help if you're used to that): 1. use the sling:resourceType property of the node, or the node type if that property is not set 2. transform that to a valid repository subpath, so for example nt:folder becomes nt:folder 3. look for scripts under a series of search paths: /sling/scripts /apps So in your case, if /bunkai is an nt:folder node with no sling:resourceType property, putting your script under /apps/nt/folder/json.js (or nt/file if it's an nt:file node), and requesting http://localhost:8080/bunkai.json should work. The script resolution happens in the MicroslingScriptResolver class, if you want to have a closer look. Hope this helps - we need to improve logging in this area to allow people to follow what's happening, and document how to connect to the repository with a browsing utility to see node details. -Bertrand
