servlet not being map to path
1 - The class is being listed in /system/console/components (and active).
2 - When I entry the url in Sling Servlet Resolver (system/console/servletresolver/) I get this message:
Could not find a suitable servlet for this request!
3- When I call it from postman or direct in browser:
4242 TIMER_END{305,ResourceResolution} URI=/bin/test/clients-by-name resolves to Resource=NonExistingResource
4 - I've clenead the browser, updated postman and restarted aem instance (crx-quickstart folder was deleted as well)
5- In postman the error status massage is 409 (
<td><div id="Message">repository state conflicting with request</div></td>Servlet class (I'm just trying to do a hello world):
@8220494(service = {Servlet.class},
property = {
SLING_SERVLET_METHODS + "=" + HttpConstants.METHOD_GET,
SLING_SERVLET_METHODS + "=" + HttpConstants.METHOD_POST,
SLING_SERVLET_EXTENSIONS + "=" + "json",
SLING_SERVLET_PATHS + "=" + "/bin/test/clients-by-name",
})
@ServiceDescription("list of clients by 'name'")
public class ClientsByNameServlet extends SlingAllMethodsServlet {
private static final long serialVersionUID = 1L;
@3214626
private ClientsByNameService clientsByNameService;
@9944223
protected void doGet(final SlingHttpServletRequest request,
final SlingHttpServletResponse response) throws ServletException, IOException {
response.setContentType("application/json");
response.getWriter().write("{ \"hello\" : aa }");
}
@9944223
protected void doPost(final SlingHttpServletRequest request,
final SlingHttpServletResponse response) throws IOException {
response.setContentType("application/json");
response.getWriter().write("{ \"hello\" : aa }");
}
}


