![de acuerdo](http://static.forosdelweb.com/fdwtheme/images/smilies/dedosarriba.png)
response.setContentType("application/octet-stream");
response.setHeader("Content-Disposition","attachment;filename="+nombreArchivo) ;
File file = new File(rutaArchivo);
FileInputStream fileIn = new FileInputStream(file);
ServletOutputStream out = response.getOutputStream();
byte[] outputByte = new byte[4096];
//copy binary contect to output stream
while(fileIn.read(outputByte, 0, 4096) != -1)
{
out.write(outputByte, 0, 4096);
}
fileIn.close();
out.flush();
out.close();