title: Can't find REST resource
body: <p>So i'm trying to develop web app which has Java Class names "Service.java" which is my REST Service. </p>
  
  <pre><code>@Path("/service")
  public class Service {
  
      @Context
      HttpServletRequest request;
      @Context
      ServletContext ctx;
  
      @GET
      @Path("/getJustAdministrators")
      @Produces(MediaType.APPLICATION_JSON)
      public Collection&lt;Administrator&gt; getJustAdministrators() {
          System.out.println("get administrators");
          return getAdministrators().getValues();
      }
  
      private Administrators getAdministrators() {
      Administrators administrators = (Administrators) ctx
              .getAttribute("administrators");
      if (administrators == null) {
          administrators = new Administrators(ctx.getRealPath(""));
          ctx.setAttribute("administrators", administrators);
      }
      return administrators;
  }
  </code></pre>
  
  <p>My main.js file, which is linked to my welcome page, looks like this:</p>
  
  <pre><code>var rootURL1 = "../eTicket/rest/service/getJustAdministrators";
  
  loadAdministrators();
  
  function loadAdministrators() {
      console.log('loadAdministrators');
      $.ajax({
          type : 'GET',
          url : rootURL1,
          dataType : "json", // data type of response
          success : function(data) {
              alert(data);
          }
      });
  }
  </code></pre>
  
  <p>And i get error in 'inspect' like this: </p>
  
  <p><a href="http://localhost:8080/eTicket/rest/service/getJustAdministrators" rel="nofollow noreferrer">http://localhost:8080/eTicket/rest/service/getJustAdministrators</a> 404 (Not Found)</p>
  
  <p>My web.xml file looks like this:</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_2_5.xsd" id="WebApp_ID" version="2.5"&gt;
    &lt;display-name&gt;eTicket&lt;/display-name&gt;
    &lt;welcome-file-list&gt;
      &lt;welcome-file&gt;start.html&lt;/welcome-file&gt;
    &lt;/welcome-file-list&gt;
    &lt;servlet&gt;
          &lt;servlet-name&gt;Jersey REST Service&lt;/servlet-name&gt;
          &lt;servlet-class&gt;org.glassfish.jersey.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;eTicket&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>Why it can't find my resource method??</p>