Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

SlingInternalRequest: A Cleaner Way to Reuse AEM Servlets with Internal API Access

Avatar

Community Advisor

7/7/25

AEM Discussions

SlingInternalRequest: A Cleaner Way to Reuse AEM Servlets with Internal API Access by Aanchal Sikka


Overview

When building features in Adobe Experience Manager (AEM), there are times you need to leverage servlet logic that already exists—especially when it interacts with internal AEM APIs not available through public interfaces.

For example, I recently needed to programmatically create Live Copies for assets. AEM doesn’t expose public Java APIs for this directly, but the WCMCommand Servlet performs this exact action behind the scenes.

Instead of reinventing the wheel or making a fragile external HTTP call, I used SlingInternalRequest API to invoke the servlet internally

 

For details, please visit https://techrevel.blog/2025/07/08/slinginternalrequest-a-cleaner-way-to-reuse-aem-servlets-with-inte...


Q&A

Please use this thread to ask questions relating to this article

2 Comments

Avatar

Administrator

7/14/25

Thanks for sharing, Aanchal! This is a clean and effective way to reuse AEM servlets using SlingInternalRequest, especially for internal APIs like WCMCommand. Clear and useful example.

Avatar

Level 6

7/21/25

Nice article, Thank you @aanchal-sikka! I was looking for this kind of feature earlier.