Content fragment - servlet | Community
Skip to main content
Level 4
May 22, 2018
Solved

Content fragment - servlet

  • May 22, 2018
  • 2 replies
  • 2708 views

Hi guys,

I'm using AEM 6.2. Long story short, I have a servlet which sends a registration success email.

It's that possible to use a content fragment as a way for the author to modify the text template for my email ?
For now the email text template is hardcoded into the registration servlet.

Thank you !

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 Hemant_arora

You can use the Content Fragment Manager API to fetch the content of the content fragment.

ContentFragmentManager ("The Adobe AEM Quickstart and Web Application.")

ContentFragment ("The Adobe AEM Quickstart and Web Application.")

Here is an example: Use this code in your servlet

Customizing and Extending Content Fragments

2 replies

Hemant_arora
Hemant_aroraAccepted solution
Level 8
May 22, 2018

You can use the Content Fragment Manager API to fetch the content of the content fragment.

ContentFragmentManager ("The Adobe AEM Quickstart and Web Application.")

ContentFragment ("The Adobe AEM Quickstart and Web Application.")

Here is an example: Use this code in your servlet

Customizing and Extending Content Fragments

smacdonald2008
Level 10
May 22, 2018

Great answer!