有一个接口,比如是:http://localhost:8080/gbss/gateway.do?service=contract
这个接口主要用dom4生成xml文件提供给其他人使用,其部分代码如下:
PrintWriter out = response.getWriter();
out.println(genXml(list));
out.flush();我通过在浏览器中输入http://localhost:8080/gbss/gateway.do?service=contract
回车后发现,xml文件输出到页面要90秒甚至更长,实际上后台的java程序代码在500毫秒里就已经走过
out.flush();
请问为什么?有什么办法可以解决呢?
这个接口主要用dom4生成xml文件提供给其他人使用,其部分代码如下:
PrintWriter out = response.getWriter();
out.println(genXml(list));
out.flush();我通过在浏览器中输入http://localhost:8080/gbss/gateway.do?service=contract
回车后发现,xml文件输出到页面要90秒甚至更长,实际上后台的java程序代码在500毫秒里就已经走过
out.flush();
请问为什么?有什么办法可以解决呢?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货