1 Reply Latest reply on Nov 4, 2014 8:03 AM by Horia Chiorean

    JCR REST API via Tomcat

    Jan Petzold Newbie

      I'm trying to use the REST API for my repo with a Tomcat 7 server and it doesn't work. Everything I tried so far is based on the modeshape-examples:




      e.g. modeshape-spring-example. Now I only added the needed dependency (as mentioned in https://docs.jboss.org/author/display/MODE40/ModeShapehttps://docs.jboss.org/author/display/MODE40/ModeShapehttps://docs.jboss.org/author/display/MODE40/ModeShape) to pom.xml but nothing changes. There's no mapping to the path modeshape-rest or anything like that.


      Documentation also says that a "connect" role is necessary so I added this in my repository-config.json for the anonymous login:


      "security" : {
              "anonymous" : {
                  "roles" : ["readonly","readwrite","admin", "connect"],
                  "useOnFailedLogin" : false


      But no effect. What am I missing or what do I have to do to enable the REST service API for any of the examples?




      It turned out that I just did not configure the users properly. I had to add a user to tomcat, give him the role "connect" and include the dependency









      to my project. Afterwards I basically copied the content of the web.xml of the modeshape-web-jcr-rest-war into my "parent" web.xml and it all worked.