Http POST not getting call | Community
Skip to main content
Level 2
March 15, 2017
Solved

Http POST not getting call

  • March 15, 2017
  • 11 replies
  • 6544 views

I have written sling servlet for POST and I called through ajax and Chrome Rest Client , but it giving the 403 forbidden error, and i went through some search and find solution that need to remove the POST method from "Apache Sling Referrer Filter" and "CSRF Filter" in configuration Manager. I did same thing and it worked.

But same code is working for my friend without removing POST in configMgr,

Can you please answer what exactly issue with http POST in AEM ?

Both are using AEM 6.2

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 smacdonald2008

To successfully post to an AEM servlet using AJAX - you need to use the AEM version of JQuery. This has a token that lets you perform a POST operation.

See:

https://helpx.adobe.com/experience-manager/using/custom-sling-servlets.html

in this article - notice we use:

 <cq:includeClientLib categories="cq.jquery" />

11 replies