如果我从家里从我的图像servlet下载图像,一切都很好。越野车图像Servlet
但是,如果我从工作中下载图像,图像将下载,但tcp连接看起来像永无止境。
public class ImageServlet extends HttpServlet {
protected void doGet(HttpServletRequest servletRequest, HttpServletResponse servletResponse) throws ServletException, IOException {
// ...
ServletOutputStream servetOutputStream = response.getOutputStream();
ImageIO.write(bufferedImage, imageRequestWrapper.mimeType, servetOutputStream);
servetOutputStream.close();
}
}
有什么建议吗?
在哪种情况下你使用代理? –
hm我在服务器上的httpd2和tomcat之间使用ajp。在我的办公室我不确定。 –
Hm,http://www.rexswain.com/httpview.html sais:“超过15秒的最大执行时间!”,但这怎么可能?我使用.close()方法。 –