title: 404 error with Jersey REST Service on Tomcat
body: <p>I have looked at all the answers available on this topic, either I am facing a completely different problem or I am missing something big time.</p>
  
  <p>Service Class:</p>
  
  <pre><code>package org.test;
  
  import javax.ws.rs.GET;
  import javax.ws.rs.Path;
  import javax.ws.rs.Produces;
  import javax.ws.rs.core.MediaType;
  
  //http://localhost:8080/JunkWeb/rest/TestRestService/callService
  @Path("/TestRestService")
  public class TestRestService {
  
      @GET
      @Path("/callService")
      @Produces(MediaType.TEXT_PLAIN)
      public String callService(){return "from Rest Service";}
  
  }//class closing
  </code></pre>
  
  <p>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" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"&gt;
    &lt;display-name&gt;JunkWeb&lt;/display-name&gt;
  
    &lt;servlet&gt;
          &lt;servlet-name&gt;jersey-serlvet&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;jersey.config.server.provider.packages&lt;/param-name&gt;
        &lt;param-value&gt;org.test&lt;/param-value&gt;
      &lt;/init-param&gt;
      &lt;!-- &lt;init-param&gt;
        &lt;param-name&gt;jersey.api.json.POJOMappingFeature&lt;/param-name&gt;
        &lt;param-value&gt;true&lt;/param-value&gt;
      &lt;/init-param&gt; --&gt;
      &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
    &lt;/servlet&gt;
     &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;jersey-serlvet&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/rest/*&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>The URL:</p>
  
  <pre><code>http://localhost:8080/JunkWeb/rest/TestRestService/callService
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/HWO0x.png" alt="enter image description here"></p>
  
  <p>Should work but it does not. Any help will be really appreciated.</p>
  
  <p>I am using Jersey 2.17 and Tomcat 8.0.20</p>