I've a servlet and inside GET method it runs a query and fetch data from ACS commons generic list page which I've created. Servlet works fine on author & publish instance but on dispatcher, it's not able fetch data.
Now, on dispatcher I've allowed servlet path and also checked the re-write rule in case it over changing the servlet path but all has been taken care. On the page, in network tab I could see the servlet is being executed with 200 status code but in response, it provides empty JSON response while if I run on author/publish, it provides proper result.
so if you request your servlet directly from AEM, it provides proper results, but if you request it via dispatcher, it returns an empty body? Can you please set dispatcher logging to TRACE and see what happens with that request on a dispatcher level?