*/
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
byte[] buf=new byte[4096];
try{
Statement stmt=new DataBaseConnection().getStatement();
ResultSet rs=stmt.executeQuery("select * from demo where id=23");
response.reset();
//response.setHeader("Content-Disposition", "attachement;filename=ss.doc;");
//**如要浏览器直接另存为就不屏蔽上行,filename 为文件名
response.setContentType("application/msword;charset=GBK");
//**此处为文件的mime类型,可以在网上搜到,本例为word
//application/vnd.ms-excel;charset=GBK 表示excel文件类型
//application/vnd.pdf;charset=GBK 表示pdf文件类型
ServletOutputStream out=response.getOutputStream();