Expand my Community achievements bar.

SOLVED

AEM form component - Secure ajax call

Avatar

Level 4
Level 4

Hi All, 

In order to improve the content on the pages, we need feedback from end users (non-authors). We'll have email address from/to fields and comments/feedback fields as part of the form. The form data must be sent to a separate java email service (outside of the AEM). How should we submit this data using an ajax call in a secure manner.

Aem version - Cloud services

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Best way is to get the form as a component -> create a secure servlet and bind it to the form component resourcetype.-> inturn can submit the data to the email service.

A very good reference which matches with your use case from my perspective is [1]. Hope this gives you a direction.

 

[1] - https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/secure-sling-servlet-need-...

View solution in original post

2 Replies

Avatar

Correct answer by
Employee Advisor

Best way is to get the form as a component -> create a secure servlet and bind it to the form component resourcetype.-> inturn can submit the data to the email service.

A very good reference which matches with your use case from my perspective is [1]. Hope this gives you a direction.

 

[1] - https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/secure-sling-servlet-need-...

Avatar

Community Advisor

I have used a very similar approach to the one suggested above and can say that it works without any issues.