title: HTTP method POST is not supported by this URL in WildFly
body: <p>I'm trying to build a Java web-app in Intellij, using Wildfly as Application server.
  In my web app, i'm trying to configure a module for restful webservices (with RestEasy library) but when I try to test my restful webservice (as post method), i receive the message "HTTP method POST is not supported by this URL".
  I don't understand why I see this message...</p>
  
  <p>I launch my rest service as follow:</p>
  
  <pre><code>http://localhost:8080/rest/email/myName/my@address.com/myMessage
  </code></pre>
  
  <p>In my pom.xml I added the needed library:</p>
  
  <pre><code>&lt;dependency&gt;
        &lt;groupId&gt;javax.ws.rs&lt;/groupId&gt;
        &lt;artifactId&gt;javax.ws.rs-api&lt;/artifactId&gt;
        &lt;version&gt;2.0.1&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
        &lt;groupId&gt;javax.ejb&lt;/groupId&gt;
        &lt;artifactId&gt;ejb-api&lt;/artifactId&gt;
        &lt;version&gt;3.0&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
        &lt;groupId&gt;org.jboss.resteasy&lt;/groupId&gt;
        &lt;artifactId&gt;resteasy-jaxrs&lt;/artifactId&gt;
        &lt;version&gt;3.0.19.Final&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
        &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
        &lt;artifactId&gt;javax.servlet-api&lt;/artifactId&gt;
        &lt;version&gt;3.1.0&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>In my web.xml I added this:</p>
  
  <pre><code>&lt;web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
           version="3.1"&gt;
  
      &lt;display-name&gt;Smoney-RS&lt;/display-name&gt;
  
      &lt;servlet&gt;
          &lt;servlet-name&gt;Resteasy&lt;/servlet-name&gt;
          &lt;servlet-class&gt;
              org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher
          &lt;/servlet-class&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;javax.ws.rs.Application&lt;/param-name&gt;
              &lt;param-value&gt;com.myapp.rs.api&lt;/param-value&gt;
          &lt;/init-param&gt;
      &lt;/servlet&gt;
  
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;Resteasy&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/rest/*&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p></p>
  
  <p>Finally, my java class for rest api:</p>
  
  <pre><code>import javax.ws.rs.*;
  import javax.ws.rs.core.MediaType;
  import javax.ws.rs.core.Response;
  
  @Path("/email")
  public class EmailRestfulImpl
  {
  
      @POST
      @Path("/{name}/{address}/{message}")
      @Produces(MediaType.APPLICATION_JSON)
      public Response sendContactUs(@PathParam("name") String name, @PathParam("address") String address, @PathParam("message") String message)
      {
          EmailRequest emailRequest = new EmailRequest();
          emailRequest.setName(name);
          emailRequest.setEmail(address);
          emailRequest.setMessage(message);
  
          return Response.status(Response.Status.OK).entity(emailRequest).build();
  
      }
  }
  </code></pre>
  
  <p>What am i doing wrong?</p>