weblogic下通过ajax解析不了xml文件(通过IE可能是可以打开的),这是因为xmlhttp.responseXML.documentElement返回空造成的,
这个问题原因分两种情况:

1.动态生成文件需要通过respnse.setContentType("text/xml;charset=UTF-8")来显示的声明文档类型;
2.静态xml,这需要在web.xml中加入下面的声明
 <mime-mapping>
 <extension>xml</extension>
 <mime-type>text/xml</mime-type>
 </mime-mapping> 

这时再次访问时weblgoic就给加上contentType了。 
注意此时如果以前访问过一次这个静态的xml,ie会缓存,所以一般设置完后ajax还是不能解析,这时
需要清除ie缓存,然后再试一次就ok了:)。

对于直接通过在ie下打开文件,比如word(xml也是一样的),默认weblogic访问xxx.doc时返回如下的响应,没有contentType

HTTP/1.1 200 OK
Date: Thu, 25 Oct 2007 07:22:26 GMT
Content-Length: 10752
Last-Modified: Thu, 25 Oct 2007 07:20:04 GMT
Accept-Ranges: bytes

所以也需要在web.xml加入mime-type才行
 <mime-mapping>
 <extension>doc</extension>
 <mime-type>application/msword</mime-type>
 </mime-mapping>
这时weblogic的响应信息:
200 OK
Date: Thu, 25 Oct 2007 07:28:38 GMT
Content-Length: 10752
Content-Type: application/msword
Last-Modified: Thu, 25 Oct 2007 07:20:04 GMT
Accept-Ranges: bytes

这样可以通过提示用户打开还是保存,而不是一堆乱码了。

对于下载的需求,可以在servlet设置response的header
response.setHeader("Content-Disposition","attachment;filename=xxx.xxx");
关于Content-Disposition的说明:http://www.ietf.org/rfc/rfc2183.txt

界面可以通过<a href="download?file=xxx">下载</a>实现