Cannot include html using data-sly-include | Community
Skip to main content
January 29, 2016
Solved

Cannot include html using data-sly-include

  • January 29, 2016
  • 2 replies
  • 4953 views

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.
Best answer by Kunal_Gaba_

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

January 29, 2016

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!

Kunal_Gaba_
Kunal_Gaba_Accepted solution
New Participant
January 29, 2016

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