Hmm. This is really strange. I got it working a couple of times, and then
when I tried to change a couple of things I get (repeatedly);

HTTP ERROR: 500

Failure running script /apps/nt/folder/json.esp: null

RequestURI=/bunkai.json
Caused by:

javax.script.ScriptException: Failure running script
/apps/nt/folder/json.esp: null
        at 
org.apache.sling.scripting.javascript.RhinoJavaScriptEngine.eval(RhinoJavaScriptEngine.java:93)
        at 
org.apache.sling.microsling.scripting.MicroslingScriptResolver$MicroslingScript.eval(MicroslingScriptResolver.java:278)
        at 
org.apache.sling.microsling.scripting.MicroslingScriptServlet.service(MicroslingScriptServlet.java:46)
        at 
org.apache.sling.microsling.servlet.MicroslingMainServlet.doService(MicroslingMainServlet.java:229)
        at 
org.apache.sling.microsling.servlet.MicroSlingFilterHelper$MicroSlingFilterChain.doFilter(MicroSlingFilterHelper.java:154)
        at 
org.apache.sling.microsling.contenttype.ResponseContentTypeResolverFilter.doFilter(ResponseContentTypeResolverFilter.java:51)
        at 
org.apache.sling.microsling.request.helpers.AbstractFilter.doFilter(AbstractFilter.java:92)
        at 
org.apache.sling.microsling.servlet.MicroSlingFilterHelper$MicroSlingFilterChain.doFilter(MicroSlingFilterHelper.java:149)
        at 
org.apache.sling.microsling.servlet.MicroSlingFilterHelper.service(MicroSlingFilterHelper.java:81)
        at 
org.apache.sling.microsling.servlet.MicroslingMainServlet.service(MicroslingMainServlet.java:183)
        at 
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
        at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367)
        at 
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        at 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
        at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
        at 
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
        at 
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
        at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
        at org.mortbay.jetty.Server.handle(Server.java:285)
        at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:502)
        at 
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:821)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:208)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378)
        at 
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226)

And I copy over the webDAV mounted file liek this (on a directory I
created myself);

 cp projects/usling/json.esp /mnt/apps/nt/folder/

What is strange is that it did work, and now I have reverted to what I
copied the first time, th "use of javascript in usling" page

<%-- ESP template example, store this as html.esp --%>
<html>
<body>
<p>This page is generated from an ESP template!</p>
<h1><%= resource.getPath() %></h1>
<%
  for (var prop in resource.node) {
    %>
      <p>
        <%= resource.node[prop] %>
      </p>
    <%
  }
%>
</body>


Thanks for any info,

PS
</html>
        at 
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)



On Jan 19, 2008 4:14 PM, Peter Svensson <[EMAIL PROTECTED]> wrote:

> I understand. But what I mean is that I know so little about Sling so I
> can't even be trusted with what chapters to have in a documentation of it.
> What I would like to be provided with is something like this;
>
> 1. Quick start to develop with Sling
> 1.a Installation
> 1.b Check that things work
> 1.c Mount as webDAV (in windows and Linux)
> 1.d Most important facts about Sling resources. Where the monsters are and
> how to defy them.
>
> 2. Examples on how to access Sling resources from client
> 2.a From Ajax-clients in browser
> 2.b From Java programs
>
> 3. Examples on how to write Sling server-side scripts
> 3.a What kind of resources can be used in scripts
> 3.b Simple example in Rhino
> 3.c Simple example in Erb
> 3.d Simple example in Jsp
>
> 4.  etc...
>
>
> And then I can fill in the actual content by asking around adn experiment,
> but I would need someone to help me with the general outline.
>
> Cheers,
> PS
>
>
> On Jan 19, 2008 3:59 PM, Felix Meschberger <[EMAIL PROTECTED]> wrote:
>
> > Hi Peter,
> >
> > Am Samstag, den 19.01.2008, 15:36 +0100 schrieb Peter Svensson:
> > > YES!  It worked. Thanks so much for saturday support :)
> > > Actually you do have a lot of documentation, but only for internal
> > > development, not for devlopers using Sling.
> >
> > Yes. And especially the docs on the site is outdated and does not
> > reflect the current Sling API....
> >
> > >  I can write that, but I have to
> > > learn it first.
> >
> > Now, this is good news !
> >
> > > If someone gave me a chapter index, with sub-subjects, I could fill
> > them in
> > > by pestering people on  this list, and it could be published as user
> > > (developer of) dox.
> >
> > There is nothing like that. My current approach is to take, what is
> > there and try to adapt to the current Sling API. This documentation
> > stuff is in flux right now, and I tend to create docs upon user
> > problems.
> >
> > Regards
> > Felix
> >
> > >
> > > Cheers,
> > > PS
> > >
> > > On Jan 19, 2008 3:10 PM, Felix Meschberger <[EMAIL PROTECTED] >
> > wrote:
> > >
> > > > Hi Peter,
> > > >
> > > > Am Samstag, den 19.01.2008, 14:15 +0100 schrieb Peter Svensson:
> > > > > OK, Good that I've still _some_ intuition working :)  But now I
> > wonder
> > > > where
> > > > > the path  "/apps/nt/folder/"  can be found?  Is it somwhere in the
> > > > "real"
> > > > > filestructure of Sling, or is it within SLings own resource
> > hierarchy?
> > > >  I
> > > > > can't seem to find it.
> > > >
> > > > The resource hierarchy of Sling is primarily based on the repository
> > > > content. So if you are looking for an /apps/nt/folder location, you
> > > > would look in the repository. If such a path does not exist, you may
> > > > create it yourself - e.g. in WebDAV by just creating the respective
> > > > directories.
> > > >
> > > > >
> > > > > I can't find /sling/script either. Should I create those
> > directores, and
> > > > if
> > > > > so, where? In my file system or inside SLing?
> > > >
> > > > You would create through WebDAV in the JCR Repository.
> > > >
> > > > >
> > > > > Sorry for all the confusion.
> > > >
> > > > No problem. We are very gratefull to everyone taking the path of
> > > > exploring Sling. It also shows us our documentation issues ....
> > > >
> > > > Regards
> > > > Felix
> > > >
> > > >
> > > > >
> > > > > Cheers,
> > > > > PS
> > > > >
> > > > > On Jan 19, 2008 12:42 PM, Bertrand Delacretaz <
> > [EMAIL PROTECTED]>
> > > > > wrote:
> > > > >
> > > > > > On Jan 19, 2008 12:39 PM, Bertrand Delacretaz <[EMAIL PROTECTED]
> > >
> > > > > > wrote:
> > > > > >
> > > > > > > ...2. transform that to a valid repository subpath, so for
> > example
> > > > > > > nt:folder becomes nt:folder...
> > > > > >
> > > > > > ...becomes nt/folder, of course.
> > > > > >
> > > > > > -Bertrand
> > > > > >
> > > >
> > > >
> >
> >
>

Reply via email to