There is a requirement where we need to resolve the Public URL at Publish instance through Servlet. Before this step what we are doing is to get the page Url from the distribution event when distribution completes. I am struggling with the servlet part how to achieve it in AEM as a cloud service.
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hello @shivamaembackend,
I am not 100% sure about the business that you are trying to tackle, however it seems you want to bind the publish URL with a servlet. I recommend proceeding with servlet binding with resourceTypes. Below is the configuration for binding a servlet with resoruceType(page template in this case)
@Component(service = Servlet.class,
property = {
Constants.SERVICE_DESCRIPTION + "=Servlet for page load",
ServletResolverConstants.SLING_SERVLET_METHODS + "=" + HttpConstants.METHOD_GET,
ServletResolverConstants.SLING_SERVLET_RESOURCE_TYPES + "=project-name/components/structure/your-page-template"
})
let me know if this serves you purpose. You can also share more insight on the business you are targeting for better assistance.
Hello @shivamaembackend,
I am not 100% sure about the business that you are trying to tackle, however it seems you want to bind the publish URL with a servlet. I recommend proceeding with servlet binding with resourceTypes. Below is the configuration for binding a servlet with resoruceType(page template in this case)
@Component(service = Servlet.class,
property = {
Constants.SERVICE_DESCRIPTION + "=Servlet for page load",
ServletResolverConstants.SLING_SERVLET_METHODS + "=" + HttpConstants.METHOD_GET,
ServletResolverConstants.SLING_SERVLET_RESOURCE_TYPES + "=project-name/components/structure/your-page-template"
})
let me know if this serves you purpose. You can also share more insight on the business you are targeting for better assistance.
@shivamaembackend Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies