jsp怎么接收Ajax返回的数据?

jsp如何接收Ajax返回的数据??
本帖最后由 showbo 于 2012-10-11 14:51:12 编辑
action跳转action2并传递参数,action2处理完后跳转到另一个页面,在jsp页面上该怎么循环判断并接收数据?


action2:
              hashMap=new HashMap<String, Object>();
hashMap.put("caller",caller);
hashMap.put("called",called);
hashMap.put("passage",passage);
hashMap.put("relly",relly);
hashMap.put("callStatus",callStatus);
hashMap.put("flag",flag);
             HttpServletResponse response = ServletActionContext.getResponse();      
    response.setCharacterEncoding("UTF-8"); 
    try {
             JSONArray result=JSONArray.fromObject(hashMap);
response.getWriter().write(result.toString());
} catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
}

------解决方案--------------------
ajaxobj.responseText就是action最后返回的内容