I have attached the version of my struts.xml when I am using Struts 2.3.28.
In the file you can see that I have defined in my "defaultStack" :
All the request of my web app use the "defaultStack" I have defined in the struts.xml. (URL, $.ajax, $.getJSON, $.post, and etc....)
And another point is that JsonInterceptor has all the time the same value for the "accept" parameter. If I set the accept header in the ajax call it doesn't change in the interceptor. I think it's a regression from 2.3.x because now we can't only one interceptor-stack with interceptor-ref to json with contentType equals application/json. Now with accept = application/json all requests are read as they are json when you have only one interceptor-stack and it's the problem.
I don"t understand why the replacement of contentType in accept cause some troubles in my App... Why now it doesn't work ?
I must remove the interceptor-ref json to have my app working ... but if I do that all ajax request to get data from server and ajax request to post data to the server doesn't work anymore.
Another solution must be to implement two custom interceptor-stack but it cost to me to refactor all my struts action to use the new custom json stack to set accept param in the interceptor-ref json....
But I dont think that is the best way and I think other persons could have the same issue than me.
There is no way to have only one interceptor-stack to catch all request with various accept and contentType like in the 2.3.x Struts version ?
Please could you have a look about this very important issue it would be great.
Thank you very much