我有一个在JBoss 7.1上运行的简单servlet。我面临的问题是,当响应非常大时,servlet会截断它,导致目标出现问题。我怎么解决这个问题。以下是我的servlet的响应代码:
protected void doPost(HttpServletRequest request, HttpServletResponse response)
{
PrintWriter writer = response.getWriter();
response.setContentType("text/xml");
response.setCharacterEncoding("UTF-8");
writer.write(the desired response);
writer.flush();
writer.close();
}