Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Sling mapping not working via Dispatcher

Avatar

Avatar
Boost 1
Level 1
madhuk16078948
Level 1

Like

1 like

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
madhuk16078948
Level 1

Like

1 like

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
madhuk16078948
Level 1

08-01-2019

Hi,

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"

    jcr:primaryType="nt:unstructured"

    sling:internalRedirect="[/content/sample/en,/]"/>

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

    resource.resolver.mapping="[/content/sample/en:/]"

    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,
    Madhukar

    Replies

    Avatar

    Avatar
    Validate 1
    Level 3
    GaneshM
    Level 3

    Likes

    15 likes

    Total Posts

    49 posts

    Correct Reply

    9 solutions
    Top badges earned
    Validate 1
    Boost 5
    Boost 3
    Boost 10
    Boost 1
    View profile

    Avatar
    Validate 1
    Level 3
    GaneshM
    Level 3

    Likes

    15 likes

    Total Posts

    49 posts

    Correct Reply

    9 solutions
    Top badges earned
    Validate 1
    Boost 5
    Boost 3
    Boost 10
    Boost 1
    View profile
    GaneshM
    Level 3

    08-01-2019

    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.

    Thanks!

    Avatar

    Avatar
    Establish
    MVP
    Gaurav-Behl
    MVP

    Likes

    248 likes

    Total Posts

    1,147 posts

    Correct Reply

    283 solutions
    Top badges earned
    Establish
    Give back 300
    Give Back 50
    Give Back 5
    Give Back 3
    View profile

    Avatar
    Establish
    MVP
    Gaurav-Behl
    MVP

    Likes

    248 likes

    Total Posts

    1,147 posts

    Correct Reply

    283 solutions
    Top badges earned
    Establish
    Give back 300
    Give Back 50
    Give Back 5
    Give Back 3
    View profile
    Gaurav-Behl
    MVP

    09-01-2019

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

    1663916_pastedImage_1.png

    1663917_pastedImage_2.png

    Avatar

    Avatar
    Validate 1
    MVP
    Runal_Trivedi
    MVP

    Likes

    45 likes

    Total Posts

    153 posts

    Correct Reply

    68 solutions
    Top badges earned
    Validate 1
    Ignite 1
    Give Back 5
    Give Back 3
    Give Back 10
    View profile

    Avatar
    Validate 1
    MVP
    Runal_Trivedi
    MVP

    Likes

    45 likes

    Total Posts

    153 posts

    Correct Reply

    68 solutions
    Top badges earned
    Validate 1
    Ignite 1
    Give Back 5
    Give Back 3
    Give Back 10
    View profile
    Runal_Trivedi
    MVP

    09-01-2019

    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.

    ~Runal