<%  
   int i=0;
   while(i++ < 3)
   {
   String  fileName  =  "bb.doc".toString();  
   //读到流中  
   InputStream  inStream=new  FileInputStream("c:/bb.doc");  
   //设置输出的格式    
   response.reset();    
   response.setContentType("application/Msword");  
   response.addHeader("Content-Disposition","attachment;  filename=\""  +  fileName  +  "\"");  
   //循环取出流中的数据    
   byte[]  b  =  new  byte[1024];    
   int  len;    
      while((len=inStream.read(b))  >0)    
   response.getOutputStream().write(b,0,len);       inStream.close();
}
%>
这样可以吗?