title: What am I doing wrong in this jersey Java class?
body: <p>Here is the class :-     </p>
  
  <pre><code> package com.bablo.rest;
  
   import javax.websocket.server.PathParam;
   import javax.ws.rs.Path;
  
   @Path("/")
   public class Library {
     @Produces("text/plain") 
     @Path("/books/{name}")
     public String getBook(@PathParam("name") String name){
       System.out.println(name);
        return "My Name is Anthony Goncalves";
    }
  }
  </code></pre>
  
  <p>Its giving this as error </p>
  
  <p>A sub-resource locator, public java.lang.String com.bablo.rest.Library.geBook(java.lang.String), can not have an entity parameter. Try to move the parameter to the corresponding resource method.</p>
  
  <p>and</p>
  
  <p>Missing dependency for method public java.lang.String com.bablo.rest.Library.getBook(java.lang.String) at parameter at index 0</p>
  
  <p>I am invoking this webservice through the Browser like this  </p>
  
  <pre><code>     http://localhost:8080/JAXRS-HelloWorld/rest/books/bablo
  </code></pre>
  
  <p>Also I am doing curl: </p>
  
  <pre><code>     curl -X GET http://localhost:8080/JAXRS-HelloWorld/rest/books/bablo
  </code></pre>