title: JAVA RESTEasy Service HTTP Status 404
body: <p>I am new in JAVA RESTEasy Service and I followed the below URL for create JAVA RESTEasy Service</p>
  
  <p><a href="http://karanbalkar.com/2013/09/tutorial-54-getting-started-with-resteasy-using-eclipse/" rel="nofollow noreferrer">http://karanbalkar.com/2013/09/tutorial-54-getting-started-with-resteasy-using-eclipse/</a></p>
  
  <p>But I am getting the below Error</p>
  
  <pre><code>HTTP Status 404 - /test/dateservice/getdate
  
  type Status report
  
  message /test/dateservice/getdate
  
  description The requested resource is not available.
  Apache Tomcat/8.0.33
  </code></pre>
  
  <p>web.xml code</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://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1"&gt;
    &lt;display-name&gt;test&lt;/display-name&gt;
    &lt;listener&gt;
      &lt;listener-class&gt;
              org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap
      &lt;/listener-class&gt;
      &lt;/listener&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;/servlet&gt;
      &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;Resteasy&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
      &lt;context-param&gt;
      &lt;param-name&gt;resteasy.scan&lt;/param-name&gt;
      &lt;param-value&gt;true&lt;/param-value&gt;
      &lt;/context-param&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>web service class code</p>
  
  <pre><code>package test_pack;
  
  import java.util.Calendar;
  import java.util.Date;
  import javax.ws.rs.GET;
  import javax.ws.rs.Path;
  import javax.ws.rs.Produces;
  import javax.ws.rs.core.MediaType;
  import javax.ws.rs.core.Response;
  
  @Path("dateservice")
  public class todService
  {
      @GET
      @Path("getdate")
      @Produces(MediaType.TEXT_HTML)
      public Response getDate() 
      {
          System.out.println("&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;Inside getDate");
          String date = null;
          Date currentDate = Calendar.getInstance().getTime();
          date = currentDate.toString();
          System.out.println("return&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;"+Response.status(200).entity(date).build());
          return Response.status(200).entity(date).build();
      }
  }
  </code></pre>
  
  <p>I am using the below jar file</p>
  
  <p><a href="https://i.stack.imgur.com/xFZrp.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xFZrp.jpg" alt="enter image description here"></a></p>
  
  <p>I run this using below URL</p>
  
  <p><a href="http://localhost:8080/test/dateservice/getdate" rel="nofollow noreferrer">http://localhost:8080/test/dateservice/getdate</a></p>
  
  <p>What am I missing?</p>