I'm trying to send a JSON string to method "foo\_insert\_udpate" in my Spring MVC controller "BaseController" using a jQuery ajax call. The server is localhost started from within my Eclipse session.

index.jsp--------

```
function popupFoo_update_submit() {
   aRowData = $('#form_popupFoo_update').serializeArray();
   var sRowData = JSON.stringify( aRowData);
   console.log( "sRowData is ", sRowData);
   $.ajax({
     url: 'foo_insert_update',
     type: "post",
     dataType: "json",
     contentType: "application/json; charset=utf-8",
     data: sRowData,
     success: function( response) {
         console.log( response);
         $('#fooTable').row( this).data( response).draw( false);    
     },
     error: function( e) {
         console.log(e);
         alert( "Error on update: " + e.message)
     }            
   });
}

```

BaseController-----

```
@RequestMapping(value="foo_insert_update", method = RequestMethod.POST)
public @ResponseBody String fooUpdateHandler( @RequestParam String json_InnString)
{
    logger.info("entering fooUpdateHandler with " + json_InnString);

    String json_OutString = null;
    // do stuff to populate json_OutString

    logger.info("exiting  fooUpdateHandler with " + json_OutString);
    return json_OutString;
} 

```

The js function executes and sRowData does get populated and the ajax call does fire, with the result being the error-block of the ajax executes and e.messsage is undefined, and looking in the log file reveals that fooUpdateHandler never gets entered and the "console" tab of my chrome debugger shows the post is returning a 400 error.

Any ideas on how to a) fix and/or b) further debug this?

TIA,

code\_warrior