AEMaaCS - Forms submit to an AEM servlet -401 unauthorized | Community
Skip to main content
Level 9
May 15, 2024
Solved

AEMaaCS - Forms submit to an AEM servlet -401 unauthorized

  • May 15, 2024
  • 3 replies
  • 1175 views

Hi

Was trying form , on click of submit to AEM servlet - a POST , say at /bin/x path or res type and it throws a 401 (due to permissions is what I gather , how do I set it ?) . 

has anyone done this for CORE form components ? I don’t want to use a data model. 

Steps for the same would be appreciated 

thanks in advance 

 

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 workflowuser

you will need to write a custom submit handler to handle to form submission. In the custom submit handler write your logic to handle the submission

The following article should help you

https://experienceleague.adobe.com/en/docs/experience-manager-learn/cloud-service/forms/custom-submit-headless-forms/custom-submit-service#Write-the-custom-submit-service

3 replies

Level 9
May 16, 2024

Anyone please ?

Adobe Employee
May 16, 2024

So you have a core component based AF and you want to make a post call to a servlet on the click of a button?

 

Level 9
May 16, 2024

hi @workflowuser yes perhaps on click of submit at the end of the form have a post to the backend . I found an alternative way to do which is JS for massaging json in the file before sending to backend system via rules and js (globals export) . But I am clueless how I can get to the backend via restful service option within AEM submit button 

core components submit button 

workflowuserAdobe EmployeeAccepted solution
Adobe Employee
May 16, 2024

you will need to write a custom submit handler to handle to form submission. In the custom submit handler write your logic to handle the submission

The following article should help you

https://experienceleague.adobe.com/en/docs/experience-manager-learn/cloud-service/forms/custom-submit-headless-forms/custom-submit-service#Write-the-custom-submit-service

kautuk_sahni
Community Manager
Community Manager
June 19, 2024

@nitrohazedev Did you find the suggestion helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!  

Kautuk Sahni