title: 404 when calling Jersey 2 REST endpoint on Glassfish
body: <p>This is my web.xml</p>
  
  <pre><code>&lt;servlet&gt;
          &lt;servlet-name&gt;Simulator HTTP API&lt;/servlet-name&gt;
          &lt;servlet-class&gt;org.glassfish.jersey.servlet.ServletContainer&lt;/servlet-class&gt;
          &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
      &lt;/servlet&gt;
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;Simulator HTTP API&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>and this is my simple web service:</p>
  
  <pre><code>@Path("partner")
  public class PartnerAPI {
  
      @Path("/mt")
      @GET
      @Produces(MediaType.TEXT_PLAIN)
      public String sendMT() {
          return "Sent";
      }
  
  }
  </code></pre>
  
  <p>when i call it like this:</p>
  
  <pre><code>http://localhost:8080/myprojectname/partner/mt
  </code></pre>
  
  <p>i get 404 error mot found, what am i doing wrong?</p>
  
  <h3>Update</h3>
  
  <p>this is my maven</p>
  
  <pre><code>&lt;dependency&gt;
              &lt;groupId&gt;org.glassfish.jersey.core&lt;/groupId&gt;
              &lt;artifactId&gt;jersey-server&lt;/artifactId&gt;
              &lt;version&gt;2.22.1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.glassfish.jersey.core&lt;/groupId&gt;
              &lt;artifactId&gt;jersey-common&lt;/artifactId&gt;
              &lt;version&gt;2.22.1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.glassfish.jersey.core&lt;/groupId&gt;
              &lt;artifactId&gt;jersey-client&lt;/artifactId&gt;
              &lt;version&gt;2.22.1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.glassfish.jersey.containers&lt;/groupId&gt;
              &lt;artifactId&gt;jersey-container-servlet&lt;/artifactId&gt;
              &lt;version&gt;2.22.1&lt;/version&gt;
          &lt;/dependency&gt;
  </code></pre>