title: Passing a Map<String,String> to a springMVC controller
body: <p>I am trying to send a HashMap or any other Map implementation from ajax to a Spring MVC controller </p>
  
  <p>Here's the detail of how I do it : </p>
  
  <p>the Ajax call is as follow</p>
  
  <pre><code>var tags = {};
  tags["foo"] = "bar";
  tags["whee"] = "whizzz";
  
  
  $.post("doTestMap.do",   {"tags" : tags }, function(data, textStatus, jqXHR) {
  if (textStatus == 'success') {
      //handle success
      console.log("doTest returned " + data);
  } else {
      console.err("doTest returned " + data);
  }
  }); 
  </code></pre>
  
  <p>then on the controller side I have :</p>
  
  <pre><code>@RequestMapping(value="/publisher/doTestMap.do", method=RequestMethod.POST)
  public @ResponseBody String doTestMap(@RequestParam(value = "tags", defaultValue = "") HashMap&lt;String,String&gt; tags, HttpServletRequest request) {  //
  
      System.out.println(tags);
  
      return "cool";
  } 
  </code></pre>
  
  <p>Unfortunately I systematically get </p>
  
  <pre><code>org.springframework.beans.ConversionNotSupportedException: Failed to convert value of type 'java.lang.String' to required type 'java.util.Map'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [java.lang.String] to required type [java.util.Map]: no matching editors or conversion strategy found
  </code></pre>
  
  <p>What am I doing wrong ? </p>
  
  <p>Thank you.</p>