Skip to main content
Jan 29, 2016 10:43 PM UTC
Solved

Cannot include html using data-sly-include

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Kunal_Gaba_
Kunal_Gaba_Accepted solution
New Member
Jan 29, 2016 11:01 PM UTC

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

Default valid paths are -

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

2 replies

Kunal_Gaba_
Kunal_Gaba_Accepted solution
New Member
Jan 29, 2016 11:01 PM UTC

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

Default valid paths are -

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

Translate
Jan 29, 2016 11:39 PM UTC

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

Default valid paths are -

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

 

Thanks.. that solved our problem!

Translate