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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Cannot include html using data-sly-include

Avatar

Not applicable

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
Level 10

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

0 Replies

Avatar

Correct answer by
Level 10

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

Not applicable

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!