String path = ServletActionContext.getRequest().getRealPath("/");
path+="make/xlsprint/tFactory.xls";
FileInputStream is = new FileInputStream(new File(path));
/*****方案一:使用输入流读取模板,再写进输出流中****/
ByteArrayOutputStream os = new ByteArrayOutputStream();
byte[] array = new byte[(int) new File(path).length()];
is.read(array);
os.write(array);