title: deploy REST services on glassfish 4
body: <p>I cant get my REST services to start. I have one war file that includes my service.jar and in the service.jar i have my webservice with the following code</p>
  
  <pre><code>import javax.ws.rs.GET;
  import javax.ws.rs.POST;
  import javax.ws.rs.PUT;
  import javax.ws.rs.Path;
  import javax.ws.rs.Produces;
  import javax.ws.rs.core.MediaType;
  
  import se.questify.entities.exam.Question;
  
  
  @Path("/services/question")
  public class QuestionWebService {
  
      @GET
      @Path("/ping")
      @Produces({MediaType.TEXT_PLAIN})
      public String ping() {
          return "ping from localhost webservice";
      }
  }
  </code></pre>
  
  <p>When this is deployed to glassfish 4 (i run from eclipse) the webservice is not reachable at <code>http://localhost:8080/web/services/question/ping</code> (my context root is /web).</p>
  
  <p>Anyone know why this is not working?</p>
  
  <p>Web.xml</p>
  
  <pre><code>&lt;web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"&gt;
  
  
      &lt;display-name&gt;Counter Web Application&lt;/display-name&gt;
  
      &lt;servlet&gt;
          &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
          &lt;servlet-class&gt;
              javax.faces.webapp.FacesServlet
          &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;Faces Servlet&lt;/servlet-name&gt;
          &lt;url-pattern&gt;*.jsf&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  
      &lt;welcome-file-list&gt;
          &lt;welcome-file&gt;index.xhtml&lt;/welcome-file&gt;
      &lt;/welcome-file-list&gt;
  &lt;/web-app&gt;
  </code></pre>