title: Rest Web Service with Hibernate Java - Not Found
body: <p>I got not found page everytime in my Java code.
  My web.xml code as below :</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;welcome-file-list&gt;
      &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
   &lt;/welcome-file-list&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>And my application config file code is as below :</p>
  
  <pre><code>@javax.ws.rs.ApplicationPath("/restapi")
  public class ApplicationConfig extends Application {
  
   @Override
   public Set&lt;Class&lt;?&gt;&gt; getClasses() {
      Set&lt;Class&lt;?&gt;&gt; resources = new java.util.HashSet&lt;&gt;();
      addRestResourceClasses(resources) ;
      return resources;
   }
  
   private void addRestResourceClasses(Set&lt;Class&lt;?&gt;&gt; resources) {
      resources.add(ws.TodolistRestful.class) ;
   }
  }
  </code></pre>
  
  <p>And If i'll try with <code>http://localhost:8080/Rest/restapi/todolist/findallxml</code> then it'll return not found everytime.</p>
  
  <p>Here todolist and findallxml are as below code :</p>
  
  <pre><code>@Path("/todolist")
  public class TodolistRestful {
  
   @PersistenceUnit(unitName = "todolist")
   private TodolistModel tm = new TodolistModel();
  
   @GET
   @Path("/findallxml")
   @Produces(MediaType.APPLICATION_XML)
   public List&lt;Todolist&gt; findAll_XML () {
      return this.tm.findAll() ;
   }
  }
  </code></pre>
  
  <p>My Todolist class code as below : </p>
  
  <pre><code>@Entity
  @Table(name = "todolist", catalog = "angular_java")
  @XmlRootElement(name = "todolist")
  public class Todolist implements java.io.Serializable {
  private Integer id;
  private String taskName;
  private char taskDone;
  private Date taskCreated;
  private boolean taskDeleted;
  private Date taskUpdated;
  public Todolist() {}
  public Todolist(String taskName, char taskDone, Date taskCreated, boolean taskDeleted, Date taskUpdated) {
  this.taskName = taskName;
  this.taskDone = taskDone;
  this.taskCreated = taskCreated;
  this.taskDeleted = taskDeleted;
  this.taskUpdated = taskUpdated;
  }
  @Id
  @GeneratedValue(strategy = IDENTITY)
  @Column(name = "id", unique = true, nullable = false)
  public Integer getId() {
   return this.id;
  }
  public void setId(Integer id) {
   this.id = id;
  }
  ...
  }
  </code></pre>
  
  <p>This is an Todolist class which is generated automatically by Hibernate.</p>