Hi Michael, Am Donnerstag, den 28.02.2008, 12:02 +0100 schrieb Michael Marth: > Hi, > > I am fiddling around with nt:file and Sling and came across something which > seems to be a bit inconsistent or maybe a bug. > In the browser I can access the (binary) jcr:data property of an nt:file > directly, like: > http://myserver/path_to_ntfile/content/jcr%3acontent > This returns the content of the file.
As expected :-) > > But if I try to include the file contents through sling.include I get a > "resource not found" in the log ( o.a.s.j.r.i.JcrResourceResolver: Could not > resolve URL xxx to a Resource). That's OK, because it is not a node, but a > property. However, I can access it in the browser, so it struck me as a bit > inconsistent. I am not sure, whether I can help you, because you just say, you "try to include ... through sling.include" without telling which path you use to include. This should of course work, except if you mangle with the path. So if you use "/path_to_ntfile/content/jcr%3acontent" as the resource path it is expected to get an error. You would actually have to included "path_to_ntfile/content/jcr:content".... > > Related to this: a while ago we had a discussion if there is a use case for > addressing properties in urls (rather than just nodes). I think at that time > there was no use case found. Well, addressing jcr:data is a use case for me > at least. This is implemented for quite a while now: you can address properties just as any resource and you get back a property resource. By adapting appripriatly you also get the property value and more. > > (if this behaviour is really a bug let me know, I'll file it) Not sure, either, because the description is incomplete. Regards Felix
