从数据库中blob字段中,下载word文件,word文件全是乱码,怎么会事啊

<%@ page contentType="text/html; charset=GBK" import="java.io.*" import="java.sql.*" import="test.global.ConnectionFactory"%><%

Connection con = ConnectionFactory.getConnection();

con.setAutoCommit(false);

Statement st = con.createStatement();

ResultSet rs = st.executeQuery(

"select contents from BLOBIMG where id=103 ");

if (rs.next()) {

Blob blob = rs.getBlob(1);

InputStream ins = blob.getBinaryStream();

response.setContentType("application/unknown");

response.addHeader("Content-Disposition", "attachment; filename="+"output.txt");

OutputStream outStream = response.getOutputStream();

byte[] bytes = new byte[1024];

int len = 0;

while ((len=ins.read(bytes))!=-1) {

outStream.write(bytes,0,len);

}

ins.close();

outStream.close();

outStream = null;

con.commit();

con.close();

}

%>

设置一下编码格式看对不

关注~

我在tomcat下是好的,可到了weblogic8.1,word文件就成乱码了.是不是要在weblogic设置什么