How to send JSON back with JAVA?

后端 未结 4 2084
你的背包
你的背包 2021-02-14 05:04

I am having problems using Gzip compression and JQuery together. It seems that it may be caused by the way I am sending JSON responses in my Struts Actions. I use the next code

4条回答
  •  粉色の甜心
    2021-02-14 05:29

    response.getWriter().write(json.toString());

    change to: response.getWriter().print(json.toString());

提交回复
热议问题