在servlet中获取out.print("")

只需要添加这一句代码

PrintWriter out=resp.getWriter();
原文地址:https://www.cnblogs.com/smartisn/p/11624954.html