As mentioned by Jitendra, we can Script resolution to achieve this.
Reference link:- https://www.youtube.com/watch?v=ySw7vE1hdT8
How Sling resolution is done in AEM:- http://www.aemcq5tutorials.com/tutorials/sling-resource-resolution-aem/
//
If you’ve worked on AEM much, you should have at least been exposed to this diagram:

There’s a lot going on here, but I’m just going to focus on query parameters, selectors, and suffixes.
Link:- http://aempodcast.com/2013/apache-sling/sling-request-suffixes-explained/#.VpxqJvl97RY
Option 2:- Using Sling Servlet
Link:- http://stackoverflow.com/questions/29102285/how-to-invoke-sling-servlet-that-uses-resourcetype-instead-of-paths-in-slin
//
Instead of making ajax call to the path in the servlet, you make an ajax call to the component. In case you want the servlet to work with resourceType the servlet should have an additional configuration for extensions property (sling.servlet.extensions).This configuration let's you run a servlet in context of a resource(of a particular resourceType) instead of a global one.
Let me explain with an example. Consider a page content/home.html with a foo component (resourceType="/apps/someproject/components/foo) at path /par/foo . Normally on a page the component will be requested with .html selector and the resource will be rendered by the default script (foo.jsp). Let's add a servlet with the following annotation
@SlingServlet( name="Weatherservlet", extensions = "pdf", resourceType="someproject/components/foo", methods="GET", metatype=true) which will give pdf representation of the resource.
A GET request to /content/home/jcr:content/par/foo.pdf will be handled by the servlet instead offoo.jsp.
request.getResource() inside the servlet's doGet will return the component resource.
path configuration will override the resourceType configuration.
I hope this would help you.
Thanks and Regards
Kautuk Sahni