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

Upgrading a sling servlet from CQ 5.5 to AEM 6.2


Level 2


I have this old Pdf generation service which was written for cq 5.5. The service is based on a servlet written for 5.5. The issue is the servlet bundle seems to be active. on 6.2 But i am not able to invoke the servlet. i have no experience working on CQ 5.5.

I think the servlet needs to be rewritten completely. below is the servlet header.  In 5.5 the servlet path is actually under the /apps folder.

Also the source code is loaded in the apps folder and the transformation xsl is referenced from the /apps/src folder. The servlet is also bundled in a jar with the name - com.pdfservice.PDFService.

@SlingServlet(paths = { "/apps/csr/services/PdfBuilder.pdf" }, methods = { "GET" }, metatype = true)

@Properties( {

        @Property(name = "", value = "com.pdfservice.Service", propertyPrivate = false),

        @Property(name = "service.description", value = "A servlet used for generating PDFs from CQ5 templates.", propertyPrivate = false),

        @Property(name = "service.vendor", value = " Test Group-", propertyPrivate = false) })

public class Service extends SlingAllMethodsServlet {

  private static final String XSL_PATH = "apps/csr/src/com.pdfservice.PDFService/src/issue-builder-transformation.xsl";

Can anyone please help on how to upgrade the servlet for compatibility with AEM 6.2.



3 Replies


Level 2

The jar package is active in system/console/ and i can also see it system/console/components


Level 10

The servlet should be rewritten using AEM 6.2 APIs - including using the AEM UBER 6.2 jar