后台java代码
HttpServletResponse response = servletActionContext.getResponse();
response.setContenType("text/html;charset=utf-8");
PrintWriter out=response.getWriter();
Gson gson=new Gson();
String model_Json=gson.toJson(model);
out.print(model_Json);
前台js代码
$.post(url,function(data){
var model=eval("("+data+")");
//model.属性名获取值
})