title: Spring MVC - Form submit without binding object
body: <p>Im new to Spring MVC and trying to achive something that seems really simple. However i cannot get it to work or find any relevant examples.</p>
  
  <p>Using Spring MCV 3.1 with annotations. I have a form with only one select-list in it. 
  When this form is submitted, i want to be able to have the id of the select-value submitted to my controller. Thats it!</p>
  
  <p>I dont want to wrap this value in a Binding object, i'd just like to send it to the controller, preferably by get like this:
  <a href="http://www.mydomain.com/admin/products?marketId=id" rel="nofollow">http://www.mydomain.com/admin/products?marketId=id</a></p>
  
  <p>My Controller looks like this:</p>
  
  <pre><code>@RequestMapping(value = "/admin/products", method = RequestMethod.GET)
  public ModelAndView getProducts(@RequestParam("marketId") String marketId) {
  
      ModelMap model = new ModelMap();
  
      // Logic to find products by marketId is not shown
      // ...
  
      model.addAttribute("products", products);
  
      return new ModelAndView("products", model);
  }
  </code></pre>
  
  <p>I have not been able to create a jsp that compiles yet, but this is my latest jsp snippet:</p>
  
  <pre><code>&lt;form:form method="GET" action="/admin/products.htms" methodParam="marketId" &gt;
      &lt;form:select path="marketId" items="${marketList}" onchange="this.form.submit();"/&gt;
  &lt;/form:form&gt;
  </code></pre>
  
  <p>If anyone could help or point out some relevant examples i would be very grateful! I have looked at a lot of examples using a binding object to wrap the form-data, but as you can see im looking for something a bit simpler.</p>
  
  <p>Cheers!</p>