title: Specifying parameter in PUT - Rest Web Service
body: <p>I'm building a REST web service using the Jersey API and I've having a problem passing the parameter to the PUT method. The method is this:</p>
  
  <pre><code>@PUT
  @Consumes("text/html")
  public void putHtml (String content) {
      System.out.println("Content"+content);
  }
  </code></pre>
  
  <p>I'm calling it using the following: </p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
          &lt;script type="text/javascript"&gt;
              function passName()
              {
  
                  xmlHttp=new XMLHttpRequest();
                  var url = "/RestWebApp/resources/greeting";
                  xmlHttp.open("PUT",url,false);
                  xmlHttp.send();
              }
          &lt;/script&gt;
          &lt;title&gt;REST Testing&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          Put name:&lt;input type="text" name="name"/&gt;
          &lt;br /&gt;
          &lt;input type="button" value="Put" onclick="passName()"/&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The PUT method <strong>is</strong> being called since I'm getting "Content " printed in the server console (which is Glassfish) but the parameter is not being read it seems. Is there an @statement or something which I should add to the parameter?</p>
  
  <p>Thanks! 
  Krt_Malta</p>