I've created a simple HTML form to post data to Sling. The form
should, in my mind, should work exactly like the curl command
specified in the 15-minute guide:

curl --trace - -F"sling:resourceType=foo/bar" -F"title=some title"
http://admin:[EMAIL PROTECTED]:8888/content/mynode
The curl command works fine, and saves data to JCR as expected.

The <form> element looks like this:
<form method="post" action="http://admin:[EMAIL PROTECTED]:8888/content/mynode">
  <input type="text" name="title" />
  <input type="text" value="foo/bar" size="30" name="sling:resourceType" />
  <button type="submit">Post</button>
</form>

Posting the form consistently returns a 500 error:
Error while processing /content/mynode
Status  500
Message         javax.jcr.AccessDeniedException: /: not allowed to modify item
Location        /content/mynode
Parent Location         /content
Path    /content/mynode

I suspect curl handles the authentication part (admin:admin@)
differently than the browser does. How can I make the HTML form work?

-- 
Vidar S. Ramdal <[EMAIL PROTECTED]> - http://www.idium.no
Akersgata 16, N-0158 Oslo, Norway

Reply via email to