Embedding Resources in Proxied Client Libraries

Clarifying Ambiguous AEM Documentation

by Tyler Maynard

Aug 06 , 2018

If you’re planning on moving towards Adobe Experience Managers recommended pattern for clientlibs in AEM 6.3+, by storing all clientlibs in ‘/apps’ and setting ‘allowProxy=“{Boolean}true”’ so that they will be proxied by the new ‘/etc.clientlibs/’ servlet, you must store referenced assets (like images) under a folder named ‘resources’.  Although this is not explicitly stated in the documentation, using any other folder name will not work.

As you can see in the image above, the Using Client-Side Libraries documentation examples DO use this pattern, but they don’t make any explicit statements regarding the folder naming requirements. When trying to use a folder named ‘assets’, all requests were simply generating 404s. It took me a moment to find out why.  It appears that there is a debug flag you can enable which should bypass the restriction of being called ‘resources’, though that’s obviously not a long-term fix.

Joey Smith has submitted a couple of tickets with Adobe Support to address this issue.  You can contact Adobe support and ask to be notified when issue CQDOC-12969 is fixed to track this documentation bug.  He has also filed a request with Adobe to allow this folder name to be configured via a sling:osgiConfig.  When these are dealt with, we will update everyone.

Tyler Maynard is the author of several AEM training videos on Pluralsight.  He is currently employed as an AEM Solutions Architect at Hoodoo Digital.

Tags: AEM | Adobe Experience Manager | Experience Manager | Adobe CQ | AEM 6.3 | Client Libraries | Adobe Docs