jedatu
jedatu

Reputation: 4123

How does page.thumb.319.319.png get resolved in Adobe AEM?

I can't seem to figure out how Adobe AEM (formerly CQ) is resolving the thumb Url.

Given the following Url:

/content/geometrixx-outdoors/en.thumb.319.319.png

"en" is a reference to the content which relies on the geometrixx-outdoors/components/page_home sling:resourceType.

"thumb", "319" and "319" are selectors, but the component "page_home" does not have a matching jsp such as thumb.png.jsp to handle the request.

page_home inherits from geometrixx-outdoors/components/page which in turn inherits from foundation/components/page. The later has a jsp called thumbnail.jpg.jsp but that isn't a match either.

Then there is this strange directory (i.e., it isn't a component) called /libs/foundation/components/primary/cq/Page where we find thumb.png.jsp. According to some logging I added, this script is participating in the request; though I am not sure how. It simply includes the proxy.jsp which includes the jcr:content node.

I suspect that including jcr:content means a call to:

/content/info-site/en/_jcr_content.thumb.319.319.png

At this point, I am unclear what happens. It seems like a default GET.java must kick in or something. However, I can't find a _jcr_content.png.jsp or png.GET.java. There is a class at /var/classes/org/apache/jsp/libs/foundation/components/primary/cq/Page/thumb_png_jsp.java which looks like it does the work, but I am just not sure how it gets called.

EDIT: Just realized that /var/classes/org/apache/jsp/libs/foundation/components/primary/cq/Page/thumb_png_jsp.java is the compiled version of the aforementioned thumb.png.jsp so I guess that is a dead end.

Upvotes: 1

Views: 2357

Answers (1)

santiagozky
santiagozky

Reputation: 2539

it is resolved not through a jsp but through the com.day.cq.wcm.core.impl.servlets.ThumbnailServlet servlet component.

This servlet is registered to respond to the sling/servlet/default resourceType and thumb selector. so it will basically respond to any request with that selector.

you can look for it in the component list of the osgi web console

Upvotes: 5

Related Questions