解决方案 »

  1.   


    我确定是正确的。
    System.out.println()出来了
      

  2.   

    json封装的值为:[{"strBitrate":"","strCallIP":"192.168.7.222","strCallTime":"2014-5-7 14:12:43","strCallType":"呼出","strProtocol":"H323","strTime":"00:00:01"},{"strBitrate":"","strCallIP":"92.168.7.151","strCallTime":"2014-5-7 14:12:41","strCallType":"未接","strProtocol":"H323","strTime":"00:00:00"}]
      

  3.   

    1.线程问题使用ThreadLocal的全局对象保存response
    2.输出后要调用writer的flush方法
      

  4.   


    谢谢,你的参考我看了。
    现在我的问题是,在终端回调函数的那个线程里面 response.getWriter().write(json)是无法把值传给前台的request请求。
      

  5.   

    你前台怎么写的。 你配置的是application/json; 画面要用json 来处理。
      

  6.   

    $.ajax({
        type: "POST",
        url:"CallingLog",
        dataType:"json",
        contentType: "application/json; charset=utf-8",
        success: function (Jsondata) {这是前台,没有错。我感觉 就是 request和response错位的问题
      

  7.   

    打印错误看看  error: function(XMLHttpRequest, textStatus, errorThrown) {
                            alert(XMLHttpRequest.status);
                            alert(XMLHttpRequest.readyState);
                            alert(textStatus);
                        }
      

  8.   


    谢谢~~
    这个问题已经解决了~
    因为消息根本无法返回到前端。应该返回前端的消息被阻塞了。
    我在需要响应的地方设置了sleep,等到终端的参数全部接受完了之后,将消息拿来再进行response。