I am using following ajax function :
$.ajax({
url: "userhomeonload",
contentType: 'application/json',
type: 'POST',
datatype:'json',
async: true,
success: function (res) {
alert(res[i].name+" "+res[i].rollNo);
} });
I am getting correct result in alert box. Now I want to use the list returned by this ajax in struts iterator as follows :
<s:iterator value="list">
<div>
<s:property value='name'></s:property>
<s:property value="rollNo"></s:property>
</div>
</s:iterator>
But nothing is getting displayed on screen. Can anyone tell me how can I do so?