title: Sending HTML Form Data to Spring REST Web Service
body: <p>I am trying to send a simple String from a HTML form to my REST Web service based on spring, but even after numerous attempts I am unable to send the data to my webservice, every time I get "The request sent by the client was syntactically incorrect" (400) error. Can someone please look into the code snippet and let me know what I am missing out?</p>
  
  <pre><code>&lt;form action="http://localhost:8080/SpringRest/rest/store/prolist" method="GET"&gt;
      &lt;p&gt;
          Products : &lt;input type="text" name="listofproducts"  id = "listofproducts"/&gt;
      &lt;/p&gt;
      &lt;input type="submit" value="Get the Lowest Price" /&gt;
  &lt;/form&gt; 
  </code></pre>
  
  <p>Code in Controller:</p>
  
  <pre><code>@RequestMapping(value = "http://localhost:8080/SpringRest/rest/store/prolist/{listofproducts}", method = RequestMethod.GET)
  public @ResponseBody String getListOfProducts(@PathVariable String listofproducts) {
      return listofproducts;
  }
  </code></pre>