title: Spring MVC send a String from the client to controller using DOJO
body: <p>I have the following Code on my Client</p>
  
  <pre><code>    var value = {"userId":form.userId.value};
  
  var xhrArgs = {
      url : messageUrl,
      handleAs : "text",
      content: value,
      load : displayMessages,
      error : function(error) {
          dojo.byId("displayArea").innerHTML = "Error aquiring messages";
      }
  };
  dojo.xhrGet(xhrArgs);
  }
  </code></pre>
  
  <p>And on my server side controller code</p>
  
  <pre><code>@RequestMapping(value = "/getMessages.htm", method = RequestMethod.GET)
  public @ResponseBody String showMessageTable(@RequestParam("userId") String userId,ModelMap params)
  {
  </code></pre>
  
  <p>I am getting a 400 error saying</p>
  
  <p>The request sent by the client was syntactically incorrect ()</p>
  
  <p>Could someone explain what i'm doing wrong? I have tested the dojo code with firebug and the value seems to be passing just fine. Thanks!</p>