title: REST delete from jQuery : Method Not Allowed error
body: <p>I am trying to delete a record using jQuery Ajax and caling RESTful service. However when I execute, I am getting error</p>
  
  <pre><code>The specified HTTP method is not allowed for the requested resource 
  (Method Not Allowed).
  </code></pre>
  
  <p>What could be reason for this?</p>
  
  <p><strong>REST service code</strong></p>
  
  <pre><code>@Path("/employee")
  
  @DELETE
  @Path("/{empNo}")
  @Produces(MediaType.APPLICATION_JSON)
  public void remove(@PathParam("empNo") short empNo) {
  getEmployeeService().delete(empNo);
  }
  </code></pre>
  
  <p><strong>jQuery ajax code</strong></p>
  
  <pre><code>$(document).ready(function () {
      var empNo = 9870;
      $("#btnSubmit").click(function () {
          $.ajax({
              url: "http://localhost:8181/Test1/rest/employee",
              type: "POST",
              data: JSON.stringify(empNo),
              contentType: "application/json; charset=utf-8",
              dataType: "json",
          })
      });
  });
  </code></pre>