How to generate sitemap without ACS AEM Common Site Map Servlet? | Community
Skip to main content
Level 2
February 21, 2020
Solved

How to generate sitemap without ACS AEM Common Site Map Servlet?

  • February 21, 2020
  • 2 replies
  • 2706 views

Is there a way to generate a sitemap without using ACS AEM Common Site Map Servlet ?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by BrianKasingli

@anthonyt2853861,

You can take a look at the implementation of the ACS Common Site Map Servlet, and use it as inspiration to build your own Site Map servlet. Cloning "com.adobe.acs.commons.wcm.impl.SiteMapServlet" directly into your project will work without much configuration. Read the implementation of the SiteMapServlet and understand what it is doing. With this example code, it should be able to steer you to the right direction on how to implement and build your own Site Map Servlet. Also, never forget about unit tests. As an example, you can take a look at ACS Common's Site Map Servlet's Unit Test,  com.adobe.acs.commons.wcm.impl.SiteMapServletTest, as inspiration.

I hope this helps!

2 replies

arunpatidar
Community Advisor
Community Advisor
February 21, 2020

You have to write your won custom servlet to -

Get Pages under specific site and create site map structure

make sure you have correct xml content type as response.

Arun Patidar
BrianKasingli
Community Advisor and Adobe Champion
BrianKasingliCommunity Advisor and Adobe ChampionAccepted solution
Community Advisor and Adobe Champion
February 22, 2020

@anthonyt2853861,

You can take a look at the implementation of the ACS Common Site Map Servlet, and use it as inspiration to build your own Site Map servlet. Cloning "com.adobe.acs.commons.wcm.impl.SiteMapServlet" directly into your project will work without much configuration. Read the implementation of the SiteMapServlet and understand what it is doing. With this example code, it should be able to steer you to the right direction on how to implement and build your own Site Map Servlet. Also, never forget about unit tests. As an example, you can take a look at ACS Common's Site Map Servlet's Unit Test,  com.adobe.acs.commons.wcm.impl.SiteMapServletTest, as inspiration.

I hope this helps!