title: Pass a parameter to REST web service via URL
body: <p>I'm creating a small REST web service using Netbeans. This is my code:</p>
  
  <pre><code>private UriInfo context;
  private String name;
  
  public GenericResource() {
  }
  
  @GET
  @Produces("text/html")
  public String getHtml() {
      //TODO return proper representation object
      return "Hello "+ name;
  }
  
  
  @PUT
  @Consumes("text/html")
  public void putHtml(String name) {
      this.name = name;
  }
  </code></pre>
  
  <p>I'm calling the get method ok since when I call <a href="http://localhost:8080/RestWebApp/resources/greeting" rel="nofollow">http://localhost:8080/RestWebApp/resources/greeting</a> I get "Hello null" but I'm trying to pass a parameter using <a href="http://localhost:8080/RestWebApp/resources/greeting?name=Krt_Malta" rel="nofollow">http://localhost:8080/RestWebApp/resources/greeting?name=Krt_Malta</a> but the PUT method is not being called... Is this the correct way to pass a parameter or am I missing something?</p>
  
  <p>I'm a newbie to Rest bdw, so sry if it's a simple question.</p>
  
  <p>Thanks! :) 
  Krt_Malta</p>