Very classic question bt not clear to me ..can we do ajax call of a servlet registered with resourceType?
I have read some article they talk about calling the page (which has that particular resourceType component )with selector( mentioned during servlet registration )will automatically trigger the servlet registered with that resource Type .
but wanted to know in AJAX respect can we do ajax call as we do for servlet registered with Path ?
AFAIK when a servlet is registered with 'resourceType', it will be called if the respective component is invoked and servlet cannot be requested through ajax. If there's a need to call the same servlet with ajax too, then register it with 'path' as well.
As per the sling documentation, if you would specify both 'resourceType' and 'path' in the servlet, it would be registered both ways.