File not found when calling SlingServlet from AJAX or a url
I recently migrated to AEM 6.1. In the process I had to reinstall some of my OSGI bundles.
They all worked except where I call them from AJAX.
I have a servlet that I register using
@SlingServlet(paths = "/bin/stores.json", methods = "POST", metatype = false)
Inside my class I have the following method
/////////////////////////
@Override
protected void doGet(SlingHttpServletRequest request,
SlingHttpServletResponse response) throws ServerException,
IOException {
try {
// http://localhost:4502/bin/stores.json?lat=-33.9168959&lng=18.418187&uid=1
String storeUid = request.getParameter("uid");
//////////////////////////
I have checked that my osgi bundle is active on
http://localhost:4502/system/console/bundles.
When I call the following
http://localhost:4502/bin/stores.json?uid=44909
I get back
<html> <head> <title>File not found</title> </head> <body> <p>A custom errorhandler for 404 responses</p> </body> </html>
Do I have to define the path /bin/stores.json in one of the configuration interfaces on http://localhost:4502/system/console/configMgr
I looked at
Apache Sling Servlet / Script Resolver and Error handler with no success.
Please can anyone advice
Clive Stewart