AEM Insider
EP07 // AEM Complete Tutorial Series 2026

Sling Resource Resolution —
How a URL Becomes a Script

Resource types · Super types · Selectors · Search paths
/apps beats /libsmost specific winsthe script-name ladder
aeminsider.com · @aeminsider · Not affiliated with Adobe Inc.
// Chapter 01 · Six episodes of "it just worked"

We typed a URL. AEM sent back HTML.

EP04

We made a folder called card, put card.html inside it, and a Card appeared on the page. Nobody told AEM where that file was.

EP05

We made a node called cq:dialog in the same folder. We clicked Configure and it opened. We never connected the two.

EP06

Our page component had no page.html at all. Two small files — and every page still rendered a full HTML document.

Three things. One engine behind all of them — resource resolution, from Apache Sling.
// Chapter 02 · It's two questions, not one

Resolution happens in two steps.

STEP 1

URL → Resource

Sling takes the path and finds a node in the repository. That node is the resource.

one rule
STEP 2

Resource → Script

Now a different question: which file renders this node? Resource types, super types, selectors, search paths.

several rules — this is where people get stuck
Mix these two up and nothing makes sense. Keep them apart and it all does.
// Chapter 03 · Step one — the path finds the resource

A sample AEM URL, part by part.

/content/aeminsider/us/en/first-component.summary.html/abc?debug=true
path /content/aeminsider/us/en/first-component used to find the resource
selector .summary identifies what script we need to runcan have more than one — .summary.print
extension .html specifies the output format, or rendering type
suffix /abc extra information passed to the script, after the resource is resolved
query string ?debug=true optional parameters, available through the request object
Path finds the resource. Selectors and extension decide what runs. Suffix and query string are used by the script.
// Chapter 04 · Step two — which file Sling looks for

Five names, tried in order.

request: card.summary.html  ·  resource type: aeminsider/components/card
best matchfirst one that exists wins
1Selector+Extension.html→summary.html.html
2Selector.html→summary.html
3html.html→html.html
4nodename.html the component folder, not the page node→card.html
5GET.html→GET.html
worst matchmost specific wins
card.html is fourth. The file you've written since EP04 only wins because nothing above it exists.
// Chapter 05 · Super types

No file here? Ask the parent.

aeminsider/components/teaser-wide
aeminsider/components/teaser
no script of its own  ·  no dialog of its own  ·  still renders
our page component goes three levels deep — coming up
resourceType = what I am. resourceSuperType = what I extend. Sling walks up until it finds the file — script, dialog or include.
// Chapter 06 · The search paths

The resource type is relative. To this.

sling:resourceType = aeminsider/components/card
/apps/apps/aeminsider/components/card
Your project. Checked first.
/libs/libs/aeminsider/components/card
Adobe's tree. Looked at second — never put your code here.
resource.resolver.searchpath = [/apps, /libs]
Putting your own file at the same path under /apps so it beats Adobe's is called an overlay. Resolved per file, not per component.
// Chapter 07 · Our page component, up close

Two files. And no page.html.

/apps/aeminsider/components/page
.content.xml              sling:resourceSuperType =
                          core/wcm/components/page/v3/page

customheaderlibs.html     injected into <head>
customfooterlibs.html     injected before </body>

// that's the whole component. There is no page.html.
So where does the page come from? The super type. page.html lives in the parent — and it includes head.html and body.html from beside it.
aeminsider/components/page→core/wcm/components/page/v3→wcm/foundation/…/basicpage/v1
Those two files are hooks. The parent includes them at two exact spots — which is where clientlibs will plug in.
// Chapter 08 · The whole engine

Every request, every time.

1Take the path and find a node.
2Read the resource type off it.
3Look under /apps first, then /libs.
4Match the most specific file name — selector, extension, node name, method.
5Nothing there? Follow the super type and repeat in the parent.
6Keep walking up until you run out of parents.
Most specific wins · /apps beats /libs · children beat parents
// Next on AEM Insider

Next: Clientlibs

How CSS and JavaScript actually reach an AEM page. Categories, dependencies, embedding — and why the URL has that long hash in it.

EP08 · customheaderlibs.html is where it plugs in