Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

POST servlet not getting called.

Avatar

Avatar
Validate 10
Level 3
gargsahil099
Level 3

Likes

13 likes

Total Posts

57 posts

Correct Reply

4 solutions
Top badges earned
Validate 10
Validate 1
Ignite 3
Ignite 1
Give Back 5
View profile

Avatar
Validate 10
Level 3
gargsahil099
Level 3

Likes

13 likes

Total Posts

57 posts

Correct Reply

4 solutions
Top badges earned
Validate 10
Validate 1
Ignite 3
Ignite 1
Give Back 5
View profile
gargsahil099
Level 3

06-03-2020

Hi Experts,

 

I have a use case where i need to call the servlet which is registered with resourceType and method POST. Can someone please help me to suggest how can i achieve this. I have to call this on page load itself. Please suggest.

 

Thanks in advance.

AEM 6.4

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Establish
MVP
BrianKasingli
MVP

Likes

613 likes

Total Posts

590 posts

Correct Reply

231 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile

Avatar
Establish
MVP
BrianKasingli
MVP

Likes

613 likes

Total Posts

590 posts

Correct Reply

231 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile
BrianKasingli
MVP

06-03-2020

@gargsahil099,

If you are testing from an HTTP Client such as postman, you will need to configure the "Apache Sling Referrer Filter" and "Adobe Granite CSRF Filter". Other than that, if your AEM page is making an HTTP Post request, it should be working as expected with only the "Apache Sling Referrer Filter" configured without the CSRF Filter. Check out this tutorial on how to make POST requests to your AEM instance - https://sourcedcode.com/how-to-make-simple-http-post-methods-in-aem-with-a-http-rest-client

What is the AEM Apache Sling Referrer Filter OSGI configuration? https://sourcedcode.com/in-aem-what-is-the-apache-sling-referrer-filter-osgi-configuration

 

Answers (0)