To summarize : all my requests with formData objects content work in Firefox and Chrome. Some of them work also in IE11 but one not. The strange thing is the requests are not significantly different.
I use this FormData object to send data to Struts2 by Json :
formData.append("JsonInput", angular.toJson(encodeURIComponent(JSON.stringify(myVariable))));
This request doesn't work in IE11 but works in Firefox and Chrome :
$http({
method: 'POST',
url: appServer + '/rcdCalSaveData',
respondType: 'json',
headers: { 'Content-Type': undefined },
data : formData
})
Real variable names have been changed for the example.
The result in my Action method in the back controller is null (JsonInput).
Besides that, others FormData sent by requests work (not much different) :
formData.append("JsonAddVariable", angular.toJson(encodeURIComponent(JSON.stringify(anotherVariable))));
$http({
method: 'POST',
url: appServer + '/rcdDefAddfdkrfikef',
respondType: 'json',
headers: { 'Content-Type': undefined },
data: formData,
params: { mode: (service.modeAdd ? 1 : 0) }
})
So I think that the variable passed is the problem (Array in the first example and an Object in the second). But if I replace the first FormData by this it works as well :
var temp = "%5B%7B%22firstVar%22%3A7%2C%22secondVar%22%3A0%2C%22thirdVar%22%3A-2%7D%5D";
formData.append("JsonInput", temp);
Which corresponds to : [{"firstVar":7,"secondVar":0,"thirdVar":-2}]
So what Object variable content can cause problem with AngularJS and Struts2 ?
(I am using IE11)