title: Java REST WS @POST 405 Method not allowed
body: <p>I know there lots of answered questions to the same topic, however none of the answers <strong>seem</strong> to feet my problem.
  I'm trying to do a REST WS in Java.
  @GET methods work ok, but when I try to do anything else (using either RESTClient or Poster -both Firefox extensions) I get the following message:</p>
  
  <pre><code>Status Code: 405 Method Not Allowed
  Allow: GET,OPTIONS,HEAD
  Content-Length: 0
  Date: Thu, 02 Jan 2014 18:17:07 GMT
  Server: Apache-Coyote/1.1
  </code></pre>
  
  <p>Example of CRUD methods:</p>
  
  <pre><code>@PUT
  @Produces(MediaType.APPLICATION_JSON)
  @Consumes(MediaType.APPLICATION_JSON)
  @Path("/Update/{addNewData}")
  public Response Update(
          @PathParam("addNewData") JSONObject addNewData) {
      String str = new JSONObject().toString();
      return Response.status(200).entity(str).build();
  }
  
  @POST
  @Consumes(MediaType.APPLICATION_JSON)
  @Produces(MediaType.APPLICATION_JSON)
  @Path("/AddNew/{addNewData}")
  public Response AddNew(
          @PathParam("addNew") JSONObject addNew) {
      String str = new JSONObject().toString();
      return Response.status(200).entity(str).build();
  }
  
  @DELETE
  @Produces(MediaType.APPLICATION_JSON)
  @Consumes(MediaType.TEXT_PLAIN)
  @Path("/Delete/{profileId}")
  public Response Delete(@PathParam("profileId") String profileId) {
      String str = new JSONObject().toString();
      return Response.status(200).entity(str).build();
  }
  </code></pre>
  
  <p>In case it's needed, here's the web.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0"&gt;
    &lt;display-name&gt;RMGTrackerServices&lt;/display-name&gt;
    &lt;servlet&gt;
      &lt;servlet-name&gt;Jersey REST Service&lt;/servlet-name&gt;
      &lt;servlet-class&gt;
    com.sun.jersey.spi.container.servlet.ServletContainer
  &lt;/servlet-class&gt;
      &lt;init-param&gt;
        &lt;param-name&gt;com.sun.jersey.config.property.packages&lt;/param-name&gt;
        &lt;param-value&gt;middlewireServices&lt;/param-value&gt;
      &lt;/init-param&gt;
      &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
    &lt;/servlet&gt;
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;Jersey REST Service&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/rest/*&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>Using Apache 7.0.47.
  Thanks in advance.</p>