52,778
社区成员
发帖
与我相关
我的任务
分享
$.ajax({
type:"post",
url:"<%=path%>/Branch_getBranchInfo?id="+node.id,
dataType:'json',
success: function(data){
alert(data.text);
}});
HttpServletRequest request = ServletActionContext.getRequest();
HttpServletResponse response = ServletActionContext.getResponse();
String id = request.getParameter("id");
List<Branch> branchInfo = userService.searchBranch(id);
JSONArray jobj = JSONArray.fromObject(branchInfo);
//JSONObject jobj = new JSONObject(branchInfo);
System.out.println("***" + jobj);
response.setContentType("text/javascript; charset=utf-8");
try {
response.getWriter().write(jobj.toString());
} catch (IOException e) {
e.printStackTrace();
}