POST JSON fails with 415 Unsupported media type, Spring 3 mvc

I am trying to send a POST request to a servlet. Request is sent via jQuery in this way: var productCategory = new Object(); productCategory.idProductCategory = 1; productCategory.description = “Descrizione2”; newCategory(productCategory); where newCategory is function newCategory(productCategory) { $.postJSON(“ajax/newproductcategory”, productCategory, function( idProductCategory) { console.debug(“Inserted: ” + idProductCategory); }); } and postJSON is $.postJSON = function(url, data, … Read more

ASP.NET MS11-100: how can I change the limit on the maximum number of posted form values?

Microsoft recently (12-29-2011) released an update to address several serious security vulnerabilities in the .NET Framework. One of the fixes introduced by MS11-100 temporarily mitigates a potential DoS attack involving hash table collisions. It appears this fix breaks pages that contain a lot of POST data. In our case, on pages that have very large … Read more

jQuery posting JSON

update: I would like to pass the var value to the server hello, same old, same old … 🙂 I have a form called <form id=”testForm” action=”javascript:test()”> and a code area called <code id=”testArea”></code> I am using this code to stringify and display the data in the code area: var formData = form2object(‘testForm’); document.getElementById(‘testArea’).innerHTML = … Read more

How do I catch an Ajax query post error?

I would like to catch the error and show the appropriate message if the Ajax request fails. My code is like the following, but I could not manage to catch the failing Ajax request. function getAjaxData(id) { $.post(“status.ajax.php”, {deviceId : id}, function(data){ var tab1; if (data.length>0) { tab1 = data; } else { tab1 = … Read more