现提供两个解决方案: A:使用HTTP, B:在Servlet中,通过设置ContentType和使用java.io包的Stream等类可作到.例如: response.setContentType(“application/x-msword”); 然后想输出缓冲中写一些东东即可。