Expand my Community achievements bar.

SOLVED

AEM Cloud Publisher | Sling servlet response is empty

Avatar

Level 2

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.

 

pradeepdubey_0-1657613701663.png

 

 

Any help is highly appreciated.

 

Thanks,

Pradeep

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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!

View solution in original post

4 Replies

Avatar

Correct answer by
Community Advisor

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!

Avatar

Community Advisor

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.

Avatar

Community Advisor

Hi,

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



Arun Patidar