On Wed, May 12, 2010 at 03:56, Tony Giaccone <t...@giaccone.org> wrote:
>        String repoURL = 
> "http://admin:ad...@localhost:8080/sling/content/myNode";;
>
>            PostMethod post = new PostMethod(repoURL);
> ...
>                        status = client.executeMethod( post );
> ...
> javax.jcr.AccessDeniedException: /content/myNode/sling:resourceType: not 
> allowed to add or modify item


Note sure, but I think commons-httpclient doesn't use credentials
given in the url like "admin:admin". You have to use a Credentials
object.

Or maybe it is not doing a preemptive authentication (which is
required for a POST to sling for the out-of-the-box http basic auth
handler in Sling, afaik).

See here: http://hc.apache.org/httpclient-3.x/authentication.html

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetsc...@day.com

Reply via email to