AEM Cloud Publisher | Sling servlet response is empty | Community
Skip to main content
Level 2
July 12, 2022
Solved

AEM Cloud Publisher | Sling servlet response is empty

  • July 12, 2022
  • 4 replies
  • 1561 views

Hi Folks,

 

I have written a servlet which is working fine in AEM cloud author instance, returning the string response. When I call the same servlet in publisher+dispatcher instance, response is empty, though the response code is 200.

 

Attached for your reference.

 

 

 

Any help is highly appreciated.

 

Thanks,

Pradeep

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 Asutosh_Jena_

Hi @pradeepdubey 

 

I see you are using a GET request. Can you please confirm if the request is not cached? Also please check if the request is sent to publish instance or not and what response you got back from publish instance. Next you need to check at the dispatcher log to see where it is failing.

 

Thanks!

4 replies

Manu_Mathew_
Community Advisor
Community Advisor
July 12, 2022
Asutosh_Jena_
Community Advisor
Asutosh_Jena_Community AdvisorAccepted solution
Community Advisor
July 12, 2022

Hi @pradeepdubey 

 

I see you are using a GET request. Can you please confirm if the request is not cached? Also please check if the request is sent to publish instance or not and what response you got back from publish instance. Next you need to check at the dispatcher log to see where it is failing.

 

Thanks!

Sachin_Arora_
Community Advisor
Community Advisor
July 12, 2022

Generally servlet works fine on Author as we have logged in and session from request gets created correctly with all permissions if you are not creating session from service user.

As you are getting 200 response code it means request is allowed on dispatcher. Please check logs when you are hitting the servlet on publisher. It could be the case there is some exception in servlet which is being catch and we have not specifically set response code status to 500 which means response code would be 200 but functionality is breaking in between.

arunpatidar
Community Advisor
Community Advisor
July 12, 2022

Hi,

Can you check the request logs? And do you have logs which you can check?

Arun Patidar