728x90
반응형
dispatcher-servlet.xml
1 2 3 4 5 6 7 8 9 10 11 | <bean name="lenient" class="net.sf.json.util.CycleDetectionStrategy$LenientCycleDetectionStrategy"/> <bean name="jsonConfig" class="net.sf.json.JsonConfig"> <property name="cycleDetectionStrategy" ref="lenient" /> </bean> <bean name="jsonView" class="net.sf.json.spring.web.servlet.view.JsonView" > <property name="jsonConfig" ref="jsonConfig" /> <property name="contentType"> <value>text/xml;charset=utf-8</value> </property> </bean> | cs |
MyHomeController.Java
1 2 3 4 5 |
| cs |
myHomeIndex.jsp
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | $(document).ready(function(){ jQuery.ajax({ type:"POST", url:"selectHomeIdexList.do", dataType:"json", data:$("#myHomeVO").serialize(), success: function(data) { console.log("data==>"+data.resultList); }, error:function (data,status,error) { console.log("data==>"+data.resultList+", status==>"+status+", error==>"+error); } }); }); | cs |
728x90
반응형