[
https://issues.apache.org/jira/browse/WW-4684?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15458186#comment-15458186
]
COMBEAU edited comment on WW-4684 at 9/2/16 10:51 AM:
------------------------------------------------------
I have attach a java class for example.
I used this ajax code to call the action struts :
$.ajax({
url:'jsondeserial.action',
type:"POST",
data:{userLogin:'toto'},
contentType:"application/json; charset=utf-8",
dataType:"json",
success: function(data){
}
});
With ajax call userLogin always have null value. In the URL like this :
http://localhost:8080/myapp/jsondeserial.action?userLogin=test it's OK
I debugged JSONInterceptor and "accept" attribute doesn't contains
"application/json"
was (Author: walkn):
I have attach a java class for example.
I used this ajax code to call the action struts :
$.ajax({
url:'jsondeserial.action',
type:"POST",
data:{userLogin:'toto'},
contentType:"application/json; charset=utf-8",
dataType:"json",
success: function(data){
}
});
With ajax call userLogin always have null value. In the URL like this :
http://localhost:8080/myapp/jsondeserial.action?userLogin=test it's OK
> No set parameter value to action
> --------------------------------
>
> Key: WW-4684
> URL: https://issues.apache.org/jira/browse/WW-4684
> Project: Struts 2
> Issue Type: Bug
> Components: Core Actions
> Affects Versions: 2.5.2
> Environment: Windows
> Reporter: COMBEAU
> Fix For: 2.5.3
>
> Attachments: ActionSample.java, struts.xml
>
>
> I have an issue on my webapp since I have update Struts 2 to version 2.5.2
> from 2.3.28.
> When I post a form with parameters via ajax call, on the action class setters
> are not called. All the time the setter and getter return "null" value
> I used Struts2-core and struts2-json-plugin
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)