title: AEM Servlet ResourceType in AJAX URL
body: <p>Hello I want to use the sling ResourceType as oppose to the servletpath.</p>
  <p>So this is my original path:</p>
  <pre><code>@Component(service=Servlet.class,
  property={&quot;sling.servlet.paths=/bin/jit/ccpa&quot;,
            &quot;sling.servlet.extensions=html&quot;,
            &quot;sling.servlet.methods=&quot; + METHOD_POST}
  )
  </code></pre>
  <p>And this is an update for the resourceType.</p>
  <pre><code>@Component(service=Servlet.class,
  property={&quot;sling.servlet.resourceTypes=&quot;+&quot;falcon/components/pages/rwd/page_home&quot;,
            &quot;sling.servlet.extensions=html&quot;,
            &quot;sling.servlet.selectors=&quot;+&quot;sample&quot;,
            &quot;sling.servlet.methods=&quot; + METHOD_POST}
  )
  </code></pre>
  <p>For my ajax call how should I configure it?</p>
  <pre><code>$.ajax({
                  type: 'POST',
                  url: '/bin/jit/ccpa',
                  data: data,
                  success: function (data) {
                      if (data != &quot;&quot; &amp;&amp; data != &quot;error&quot;) {
                          var res = $.parseJSON(data);
                          if (res === undefined || res === null || res.sendEmailResponse === undefined) {
                              formError(form, container);
                          }
                      }
                  error: function () {
                      formError(form, container);
                  }
              });
  </code></pre>
  <p>What goes in the URL value in the Ajax call?
  And is my resourceType value correct in my Servlet, how is that usually obtained?</p>