我用Extjs4做了一个文件上传的功能/后台用的是Struts2,文件刚上传成功后IE浏览器就提示是否下载?返回的成功信息也被拦截了,火狐是正常的

代码如下:
File uploadFile = new File(dir, fileName);
OutputStream out = new FileOutputStream(uploadFile);
byte[] buffer = new byte[1024 * 1024];
int length;
while ((length = in.read(buffer)) > 0) {
out.write(buffer, 0, length);
}
请问这种情况要如何避免?
------解决方案--------------------
response.setContentType("text/html;charst=xxx");
试试