title: Running Jersey project (Rest web service) to tomcat
body: <p>I'm try to follow this guide: <a href="http://www.vogella.de/articles/REST/article.html" rel="nofollow noreferrer">tutorial</a> but when I execute on the web browser it returns an error:</p>
  
  <pre><code>HTTP Status 404 - /
  type Status report
  message /
  description The requested resource (/rest.api/rest/hello) is not available.
  </code></pre>
  
  <p>I have installed tomcat7 in /usr/local on my mac and ran it with startup.sh on the terminal.
  This is my web.xml and Hello.java</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" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0"&gt;
  &lt;display-name&gt;HelloRest&lt;/display-name&gt;
  
  &lt;servlet&gt;
  &lt;servlet-name&gt;Jersey REST Service&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;com.sun.jersey.config.property.packages&lt;/param-name&gt;
    &lt;param-value&gt;rest.api&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;
  </code></pre>
  
  <p></p>
  
  <pre><code>package rest.api;
  
  import javax.ws.rs.GET;
  import javax.ws.rs.Path;
  import javax.ws.rs.Produces;
  import javax.ws.rs.core.MediaType;
  
  // POJO, no interface no extends
  
  // The class registers its methods for the HTTP GET request using the @GET annotation. 
  // Using the @Produces annotation, it defines that it can deliver several MIME types,
  // text, XML and HTML. 
  
  // The browser requests per default the HTML MIME type.
  
  //Sets the path to base URL + /hello
  @Path("/hello")
  public class Hello {
  
  // This method is called if TEXT_PLAIN is request
  @GET
  @Produces(MediaType.TEXT_PLAIN)
  public String sayPlainTextHello() {
      return "Hello Jersey";
  }
  
  // This method is called if XML is request
  @GET
  @Produces(MediaType.TEXT_XML)
  public String sayXMLHello() {
      return "&lt;?xml version=\"1.0\"?&gt;" + "&lt;hello&gt; Hello Jersey" + "&lt;/hello&gt;";
  }
  
  // This method is called if HTML is request
  @GET
  @Produces(MediaType.TEXT_HTML)
  public String sayHtmlHello() {
      return "&lt;html&gt; " + "&lt;title&gt;" + "Hello Jersey" + "&lt;/title&gt;"
              + "&lt;body&gt;&lt;h1&gt;" + "Hello Jersey" + "&lt;/body&gt;&lt;/h1&gt;" + "&lt;/html&gt; ";
  }
  
  }
  </code></pre>
  
  <p>This is my configuration project:</p>
  
  <p><img src="https://i.stack.imgur.com/7r4E0.png" alt="enter image description here"></p>
  
  <p>Any suggest?</p>