title: How to get the POST/GET params in a java WebMethod?
body: <p>I have created a java web service with netbeans 7.1 (glassfish3.1). </p>
  
  <p>It is supposed to be visited via clicking a URL (like: <a href="http://localhost:8080/ImageService/GetImage?visitDate=" rel="nofollow">http://localhost:8080/ImageService/GetImage?visitDate=</a>'2012-01-01') to generate an image for web users. And there are some parameters in the URL that I need to get to use inside the <code>WebMethod</code>. </p>
  
  <pre><code>    @WebMethod(operationName = "GetImage")
      public void GetImage() {
        // Date visitDate = GET["visitDate"];
        ...
      }
  </code></pre>
  
  <p>Or, how can I make the java web service invoked via http get method?</p>
  
  <p>PS: In .net, this config will enable the feature - calling a web service via URL. I'm asking  for a java version.</p>
  
  <pre><code>&lt;webServices&gt;
   &lt;protocols&gt;
    &lt;add name="HttpPost"/&gt;
    &lt;add name="HttpGet"/&gt;
   &lt;/protocols&gt;
  &lt;/webServices&gt;
  </code></pre>
  
  <p>Is this doable? How can I get that work?</p>
  
  <p>Thanks!</p>
  
  <p>Finally, I have given up this, turn to use jsp to do that. But still hoping someone can tell me - if web-service way is possible or not. </p>
  
  <p>Thanks!</p>