Hi Alex, Am Mittwoch, den 20.02.2008, 16:05 +0100 schrieb Alexander Klimetschek: > As Sling has the general tendency to copy all the features and > conventions of a UNIX file system into JCR (which is a good thing), > what about copying over the executable flag of unix files? Could be a > jcr property like "sling:executable".
We were thinking of such functionality. But it has two drawbacks: It is not easiliy manageable through WebDAV and requires low level repository access and if implemented in the realm of ACLs (the natural integration point IMHO, and of course *nix like) it gets nasty because there is no public API for that .... Finally there is a third drawback: We are talking about resources, which need not necessairily come out of the repository (e.g. bundle based scripts). In this context we don't even have a way of setting such flags easily. Regards Felix > > It would only be a problem if there are javascript files that should > get executed either client or server, depending on the request, but I > cannot imagine such a case. So one could mark the /dojo/* tree as non- > executable. Well, this raises the question for the default value of > the flag: executable (practically if most scripts are server-side) or > not executable (if most js files are client-side)? > > Regards, > Alex > > Am 20.02.2008 um 15:37 schrieb Felix Meschberger: > > > Hi, > > > > Am Mittwoch, den 20.02.2008, 14:33 +0100 schrieb Lars Trieloff: > >> I was unable to get the JSON representation (curl -u admin:admin > >> http://localhost:8888/dojo/dojo/AdapterRegistry.js.1.json) > >> because Sling tries to execute the JS script then and gives me > >> following error message: > >> > >> org.mozilla.javascript.EcmaError: ReferenceError: "dojo" is not > >> defined. (/dojo/dojo/AdapterRegistry.js#1) ... and so on. > > > > Yes, we execute a resource, which adapts to Servlet, if the request > > has > > an extension. Therefore the request /dojo/dojo/AdapterRegistry.js (no > > extension) is not executed by the given request is executed (extension > > json). > > > > This collision between streaming the script and executing the script > > is > > an issue only with .js files AFAIK. The reason for this is, that the > > JavaScript ScriptEngineFactory is registered for .js and .esp files. > > > > We might fix this by using .ecma instead of .js for server-side > > JavaScript files. > > > > WDYT ? > > > >> > >> So my question is how do I define subtrees that are not executable, > >> even if they contain a script. I think microsling originally had a > >> convention that only scripts in /scripts were actually executable, > >> but > >> the current code deviates from this convention. > > > > This depends from where you are looking from: I would say, microsling > > devaiated from Sling in that respect ;-) > > > > Regards > > Felix > > > > -- > Alexander Klimetschek > [EMAIL PROTECTED] > > > >
