Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

Sling mapping not working via Dispatcher


Level 1


I've added the sling mapping rules by creating a node under map.publish -> http and created a node with name localhost.8080 and added the following property:

<?xml version="1.0" encoding="UTF-8"?>

<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"



Also, I've added the mapping rules in org.apache.sling.jcr.resource.internal.JcrFesourceResolverFactoryImpl.xml


    Now, page hierarchy is content -> sample -> en -> customers and when I try to access any page on publish instance e.g. http:localhost:4503/customers.html then it works fine. But, when the same customers page I try to access using web server http:localhost:8080/customers.html then it shows 404 error.
    However, when I try to resolve both the publish and web server url in jcrresolver in felix console, then both are getting resolved to /content/sample/en/customers.

    Is there anything am I missing here?

    Best regards,

    3 Replies


    Level 4

    Hi Madhukar,

    You need to check the dispatcher.any and httpd.conf.  Are you able to get the page when hitting http:localhost:8080/content/sample/en/customers.html?

    You might need to check the renders config in Dispatcher.any and dispatcher module in httpd.conf

    FYI, you can check the reference here We.Retail dispatcher.any and httpd.conf · GitHub or share your dispatcher.any and httpd.conf configs.



    Level 10

    try this under map.publish > http  and test with http:localhost/customers.html




    Community Advisor

    Your dispatcher may have a blanket deny for all incoming request and selective allow in dispatcher /filter configuration section, so it must be blocking the incoming request in dispatcher itself.