Search code examples
javajsprssaem

How to overwrite the default functionality of RSS feed in the AEM?


AEM has the default functionality to get the RSS feed and atom. I need to overwrite the URL value in the RSS feed. How the default functionality of RSS feed works in AEM and how to overwrite that one.

There are few steps tried which don't work. They are

  1. Trying to overlay the same structure of /libs/fondation/... under the /apps/{project}/... and did custom changes under the /apps files. AEM basically search thing initially in /apps and then /libs.

  2. To cross check the process removed feed.jsp and feedentry.jsp from /libs/foundation/components/page/{file}. After the default RSS feed functionality works fine in my local.

URL to hit the RSS feed in local: http://localhost:{port}/{content path}/{page}.feed.rss.xml

Note: Version of AEM used is 6.4

The expected thing is to overwrite the URL of the RSS feed

Is anyone facing the same issue and the solution for overwriting the URL


Solution

  • Since you are overlaying in /apps/<project>/ instead of /apps/ which is the default search path for the Sling.

    Typically, Sling first searches in the /apps/ and then /libs/ and your changes are in /apps/<project> this is why the default code is being picked up from the /libs/.

    You can resolve this in two ways -

    • Move your changes from /apps/<project>/ to /apps/ (easy but not recommended, as your changes are not in your project folder but outside of it)
    • Keep your changes in /apps/<project>/. To change the default search path of Sling, navigate to ./system/console/configMgr and change Resource Search Path field in Apache Sling Resource Resolver Factory configuration.

    enter image description here