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.
SOLVED

Cannot include html using data-sly-include

Avatar

Former Community Member

In our component html file we are trying to include another html file located at "/etc/designs/proj-name/clientlib-emp/html/ex.html"

<div data-sly-include="/etc/designs/proj-name/clientlib-emp/ex.html"></div>

but we're seeing this error:

Caused by: java.lang.UnsupportedOperationException: Access to resource /etc/designs/proj-name/clientlib-emp/html/ex.html is denied, since the resource does not reside on the search path

What am i missing?

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Sightly before including the resource always checks the path of the resource in the search paths set in the resource resolver configuration. 

http://localhost:4502/system/console/configMgr/org.apache.sling.jcr.resource.internal.JcrResourceRes...

Default valid paths are -

/apps,/libs,/apps/foundation/components/primary,/libs/foundation/components/primary

View solution in original post

2 Replies

Avatar

Correct answer by
Employee Advisor

Sightly before including the resource always checks the path of the resource in the search paths set in the resource resolver configuration. 

http://localhost:4502/system/console/configMgr/org.apache.sling.jcr.resource.internal.JcrResourceRes...

Default valid paths are -

/apps,/libs,/apps/foundation/components/primary,/libs/foundation/components/primary

Avatar

Former Community Member

kunal23 wrote...

Sightly before including the resource always checks the path of the resource in the search paths set in the resource resolver configuration. 

http://localhost:4502/system/console/configMgr/org.apache.sling.jcr.resource.internal.JcrResourceRes...

Default valid paths are -

/apps,/libs,/apps/foundation/components/primary,/libs/foundation/components/primary

 

Thanks.. that solved our problem!