3 Replies Latest reply on Apr 10, 2018 3:14 PM by smacdonald2008

    AEM 6.3 - registering Servlets with paths

    brendanf9753525 Level 1

      Hi all,


      I have a servlet that I am trying to register at the /feed path. It will be a servlet that takes GET requests and returns out some data.


      My servlet has this path at the top when registering it.


      @SlingServlet(paths = "/feed", methods = "GET", metatype = true)


      I also went into the Apache Sling Servlet/Script Resolver and Error Handler and added the /feed/ path as one of the allowed scripts.




      However, whenever I visit localhost:4502/feed, I get a 403 forbidden error. I see that it gets to my class and path, but it throws a 403 regardless.


      However, If I move the servlet to /bin/feed, I can visit it successfully without a 403 error.


      Is there a way to have servlets registered at paths without having the /bin/ path in front of them? I am pretty new to java servlets so any advice/suggestions would definitely go a long way.